Solving a third order non-linear ode using ode45

조회 수: 11 (최근 30일)
Abhinav
Abhinav 2012년 10월 28일
댓글: David After 2020년 9월 4일
I need to solve
F''' + 2FF" + 1 - F'^2 = 0
with the boundary conditions
F(0)=F'(0)=0 and F'(infinity)=1.
I am new to using the ode solver in matlab and am not sure how to make it solve a non-linear third order equation. Any suggestion would be appreciated.
  댓글 수: 1
Shiv Patel
Shiv Patel 2017년 11월 17일
Thank you for this comment, it helped with my homework!

댓글을 달려면 로그인하십시오.

답변 (4개)

Star Strider
Star Strider 2012년 10월 28일
The ode45 function is not applicable to two-point boundary value problems such as yours. You need to use bvp4c for example, as I did here:
dYdX = @(X,Y) [Y(2); Y(3); Y(2).^2-Y(1).*Y(2).*2.0-1.0]; % Differential equation
res = @(ya,yb) [ya(1); ya(2); yb(2)-1]; % Boundary conditions
SolYinit = bvpinit([0 1E+1], [1; 1; 1]);
Fsol = bvp4c(dYdX, res, SolYinit);
X = Fsol.x;
F = Fsol.y;
figure(1)
plot(X, F)
legend('F_1', 'F_2', 'F_3', 3)
grid
You will not be able to set your endpoint to Inf or other number larger than about 10 (at least I could not) because that generates a singular Jacobian (or so MATLAB tells me). There are links to bvpinit and the other functions throughout and at the end of the bvp4c page. You might also want to experiment with bvp5c.
This was an interesting problem. I am glad you asked the question.
  댓글 수: 6
David After
David After 2020년 9월 4일
How can i solve this eqaution?
F''' (eta)+ F(eta)F"(eta) + F'^2(eta) = 0
with the boundary conditions
F(0)=F''(0)=0 and F'(infinity)=0 and eta is 0:0.1:6
i want to plot it and create a table for it (eta-f-f'-f'')
I am new to using the ode solver in matlab and am not sure how to make it solve a equation. Any suggestion would be appreciated.
thank you
my email : ff223325@gmail.com
David After
David After 2020년 9월 4일
How can i solve this eqaution?
F''' (eta)+ F(eta)F"(eta) + F'^2(eta) = 0
with the boundary conditions
F(0)=F''(0)=0 and F'(infinity)=0 and eta is 0:0.1:6
i want to plot it and create a table for it (eta-f-f'-f'')
I am new to using the ode solver in matlab and am not sure how to make it solve a equation. Any suggestion would be appreciated.
thank you
my email : ff223325@gmail.com

댓글을 달려면 로그인하십시오.


R Vishnu
R Vishnu 2014년 1월 30일
Hi I hope to correct a minor error. it is f(3) = -1 -2*y(1)*y(2) + y(2)*y(2); and not f(3) = -1 -2*y(1)*y(3) + y(2)*y(2); as per your equation F''' + 2FF' + 1 - (F'^2) = 0.
  댓글 수: 1
Abhinav
Abhinav 2014년 1월 30일
Hi Vishnu, My bad.. the second term was supposed to be 2FF". I have edited the original question too.
Thanks for pointing that out!

댓글을 달려면 로그인하십시오.


Hemanth kumar C
Hemanth kumar C 2017년 11월 8일
I need to solve
(D^2-a^2)fi+a*[R*thetha+(Ra*Phi/Le)] = 0,
(D^2-a^2)thetha-(a*(dt/dy)*fi)-Pe*D(thetha)+gamma*Phi=0,
(D^2-a^2)Phi-Le*Pe*D(Phi)-a*le*(dc/dy)*fi=0
with the boundary conditions y=0;fi=Phi=thetha=0
I am new to using the ode solver in matlab and am not sure how to make it solve a non-linear second order three equation and i have written the program but i am not getting proper output . if you want to see my practise paper i will attach here . Any suggestion would be appreciated.
  댓글 수: 3
Hemanth kumar C
Hemanth kumar C 2017년 12월 7일
dc/dy ,dt/dy are the temperature and concentration gradients.i derived equations for that. i attached the program sir you can see the both equations
Hemanth kumar C
Hemanth kumar C 2017년 12월 7일
i am solving this above attached paper .i derived everything only programming part i am not getting few things .please help me to solve this problem. you can see what is dc/dy and dt/dy in the paper.

댓글을 달려면 로그인하십시오.


David After
David After 2020년 9월 4일
How can i solve this eqaution?
F''' (eta)+ F(eta)F"(eta) + F'^2(eta) = 0
with the boundary conditions
F(0)=F''(0)=0 and F'(infinity)=0 and eta is 0:0.1:6
i want to plot it and create a table for it (eta-f-f'-f'')
I am new to using the ode solver in matlab and am not sure how to make it solve a equation. Any suggestion would be appreciated.
thank you
my email : ff223325@gmail.com

카테고리

Help CenterFile Exchange에서 Boundary Value Problems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by