Solving coupled ODEs via ode45

Hello,
I have 2 secound order and coupled ordinary differential equations. For the first equation, I could find an explicit solution, i.e. d^2y/dt^2=.....
However, for the second equation, I could not find an explicit solution. Therefore, I couldn't use ode45 etc. How can I solve these equations numerically?
Thank you in advance

댓글 수: 4

Torsten
Torsten 2024년 3월 2일
If you don't know the equation, how do you want to solve it ? Or what do you mean by
However, for the second equation, I could not find an explicit solution. Therefore, I couldn't use ode45 etc.
Seymen
Seymen 2024년 3월 2일
I didn't say I don't know the equation. What I meant was that I cannot put the equation into this form: d^2y/dt^2=.....
ode45 can solve first-order initial value problems. Thus your equations must be of the form dy/dt = f(t,y).
If you have a second-order differential equation
d^2y/dt^2 = g(t,y,dy/dt)
, it can be written as two first-order differential equations by putting
z(1) = y, z(2) = dy/dt
The system then reads
dz(1)/dt = z(2)
dz(2)/dt = g(t,z(1),z(2))
Steven Lord
Steven Lord 2024년 3월 2일
Can you show us the form of the differential equations that you do know? If you show us the mathematical equations we may be able to help you translate them into MATLAB code.

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

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2024년 3월 3일

0 개 추천

If your equation is implicit then, ode15i might be the tool to use.

카테고리

질문:

2024년 3월 2일

답변:

2024년 3월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by