Solving a system of ODE with BCs

4 ビュー (過去 30 日間)
Elia Paini
Elia Paini 2021 年 4 月 20 日
コメント済み: Elia Paini 2021 年 4 月 24 日
Hi, I'm trying to solve a system of 2 ODE with boundary conditions.
The integration variable is r, which is the sferical coordinate (radius of a sphere). At the end of the simulation I should get the values of A and B as a functions of r, where the maximum value of r is 1.
k,c,a,b are constants.
The system is as follows:
I converted the system to first order one, as follows:
How can I solve it?
Thank you!


Divija Aleti
Divija Aleti 2021 年 4 月 23 日
Hi Elia,
The following link gives an example of how to solve a system of two first-order differential equations with boundary conditions. Similarly, you can solve for your converted system of four first order differential equations.
Hope this helps!
  5 件のコメント
Elia Paini
Elia Paini 2021 年 4 月 24 日
I tried to use the way you suggested me, but Matlab can't find a solution. The message is as follows:
Warning: Unable to find symbolic solution.
I think that, because the complexity of the system, bvp4c must be used. In this way, results are correct.


その他の回答 (0 件)


Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by