2nd order Differential Equation
Show older comments
Hello
i am stuck on this differential equation. Any help if you could
dx2/dt2 = 0.2(1.48 I^2 -1)
I am looking for a code in order to solve this equation, and then generate plot between I and t.
Thank you
1 Comment
Sam Chak
on 4 Jun 2022
I see x, t, and I.
Please give I in terms of x or t, or both, like I = f(x, t).
Answers (1)
Sam Chak
on 4 Jun 2022
With the limited info, this is a brief example you can explore ode45 (please Google this) and modify the differential equation to suit your needs.
F = @(t, x) [x(2); ...
0.2*(1.48*x(3)^2 - 1); ...
- (125/(74*x(3)))*(0.2*(1.48*x(3)^2 - 1) + x(2))];
tspan = [0 20]; %
init = [1, 0, 0.1];
[t, x] = ode45(F, tspan, init);
plot(t, x(:, 3), 'linewidth', 1.5)

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!