d^2/dt^2+g*R^2/(R+x)^2
x(t=0)=0
dx(t=0)/dt=750 m/s
FORWARD Euler dt=0,1s
is this correct to find the x in t=10s.

回答 (1 件)

Torsten
Torsten 2023 年 6 月 19 日
移動済み: Torsten 2023 年 6 月 19 日

0 投票

You should plot x and y against t to see whether Euler forward is maybe unstable for a time stepsize of dt = 0.1 and that this was the task of the exercise. At least the MATLAB integrator ODE45 gives a different result.
g = 9.81;
R = 6.37e6;
fun = @(t,y) [y(2);-g*R^2/(R+y(1))^2];
tspan = [0 10];
y0 = [0 750];
[T,Y] = ode45(fun,tspan,y0);
Y(end,:)
ans = 1×2
1.0e+03 * 7.0099 0.6520
plot(T,Y)

カテゴリ

ヘルプ センター および File ExchangeNumerical Integration and Differential Equations についてさらに検索

質問済み:

2023 年 6 月 19 日

移動済み:

2023 年 6 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by