second order nonlinear ode with polynomial terms
이전 댓글 표시
Hi everyone! I would resolve the following nonlinear differential equation:
f(Y) + b(Y) (Y')^2 + g(Y) Y'' = A
where Y is a function of x, i.e. Y = Y(x), and
f(Y) = a1 + a2*Y + a3*Y^2 + a4*Y^3
g(Y) = b1 f(Y)/Y^3
b(Y) = c1 (a1 + a2 Y + a3 Y^2)/Y^3
In this example A = cost, but it could be A = A(x). I have no idea how to solve with matlab.. some suggestions? can I use some usual ode-routines?
Thanks in advance for all your support.
Pinco
댓글 수: 5
Pinco
2013년 4월 30일
Kye Taylor
2013년 4월 30일
What have you tried so far? Do you know you have to write the ODE as a system of first order differential equations?
Also, do you mean that t and x are the same independent variable? Or is x a function of t? Or are there two independent variables? Whoa dude...
cr
2013년 4월 30일
If A is a function of Y, it needs to be known what function it is. I dont think its possible to generalize solution for any A. Also need to know what is x and is Y' = dY/dx or dY/dt?
Jan
2013년 4월 30일
@Pinco: Bumping after 2 hours is not useful. When the contributors do not find enough information to create an answer, reading the question again without any additional explanantions, is a waste of time. So please do not bump after 2 hours without showing, what you have done in this time.
Pinco
2013년 4월 30일
답변 (1개)
Kye Taylor
2013년 4월 30일
편집: Kye Taylor
2013년 4월 30일
You must write the ODE as a system of first-order ODEs. Use the substitution u1 = y and u2 = y'. Then, you'll end up with equations like
u1' = u2
u2' = F(u1,u2)
where F is a function of u1 and u2 (y and y')... Once you have those equations, create a function named F, like
function uPrime = F(u)
uPrime(1) = u(2);
uPrime(2) = % code for your F(u1,u2)
Note that the input u should be a two-dimensional vector where the comoponent u(1) represents u1, and u(2) represents u2. The output is also a two-dimensional vector, one element for each first-order differential equation in the system above. Such an interface to F is dictated by the requirements of the fsolve function.
댓글 수: 4
Pinco
2013년 4월 30일
Kye Taylor
2013년 5월 1일
편집: Kye Taylor
2013년 5월 1일
Ooops, i meant to say ode** ... in fact yeah i'd use ode23s, depending on what you do with those parameters; I've noticed in experimenting with my solution that there's some funny things depending on the parameters and interval of time you solve over.
Good luck... fun system.
Pinco
2013년 5월 1일
Pinco
2013년 5월 1일
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!