Matlab: differential equation: starting conditions are wrong?
Show older comments
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
Accepted Answer
More Answers (1)
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)))))
1 Comment
Niklas Kurz
on 12 May 2021
Categories
Find more on Programming 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!
