How to convert a fourth-order ordinary differential equation into a system of first-order ordinary differential equations in order to solve it.
60 views (last 30 days)
Show older comments
Hello everyone,
I am currently trying to define and convert a fourth-order ordinary differential equation into a system of first-order ordinary differential equations in order to solve it using the Runge-Kutta method.
The fourth-order ordinary differential equation I am trying to solve is as follows.
y is a function of x, and a, b, c, and d are constants.
To convert it into a system of first-order ordinary differential equations, I differentiated the left-hand side and rearranged the equation in terms of y′′′′.
However, I am not obtaining the desired solution at this point.
Could you please guide me on the correct way to define the function?
Thank you for your assistance.
3 Comments
James Tursa
on 7 Dec 2024 at 1:26
What is it about your current solution that you don't like? Can you show us your code?
Accepted Answer
Torsten
on 9 Dec 2024 at 1:28
Edited: Torsten
on 9 Dec 2024 at 1:28
If all conditions are given at x = 0, it's an easy problem:
Define
z(x) = integral_{x'=0}^{x'=x} d*sqrt(1+y'(x')^2) dx'
The system of differential equations to be solved is then given by
z' = d*sqrt(1+y'^2), z(0) = 0 (1)
(a*y'/y - b*y^3*y'''/(1+y'^2) + c*y^3*y'*y''^2/(1+y'^2)^2.5) - (a*y'(0)/y(0) - b*y(0)^3*y(0)'''/(1+y'(0)^2) + c*y(0)^3*y'(0)*y''(0)^2/(1+y'(0)^2)^2.5) = z (2)
Now solve (2) for y''' and convert it to a system of three first-order equations for y,y' and y''.
Then use a MATLAB ode-integrator to solve (1) and (2) as a system of four first-order equations for z, y, y' and y''.
0 Comments
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations 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!