Matlab: differential equation: starting conditions are wrong?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Niklas Kurz
am 9 Mai 2021
Kommentiert: Niklas Kurz
am 12 Mai 2021
I solved manually:
with 

but if I solve it with Matlab:
syms v(t) g alpha m v0;
D = diff(v,t) == g - alpha/m*v;
c1 = v;
cond = c1(0) == v0;
S = dsolve(D,cond);
pretty(S)
I get a different solution, even if I'm sure mine is right.
I know this topic is a little vast, but maybe some of you talented people has time to investigate
0 Kommentare
Akzeptierte Antwort
Cris LaPierre
am 9 Mai 2021
Bearbeitet: Cris LaPierre
am 9 Mai 2021
I'm no expert, but isn't the integral equal to
That way, the algebra works out to match the result MATLAB is giving you
syms v(t) g alpha m v0;
D = diff(v,t) == g - alpha/m*v;
cond = v(0) == v0;
S = dsolve(D,cond)
which simplifies to
1 Kommentar
Weitere Antworten (1)
Walter Roberson
am 9 Mai 2021
syms v(t) g alpha m v0;
D = diff(v,t) == g - alpha/m*v;
c1 = v;
cond = c1(0) == v0;
S = dsolve(D,cond);
sum(cellfun(@(X) collect(X,[g,m,alpha]), children((collect(expand(S),g)))))
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

