2
$\begingroup$

I'm a newbie here, I want to solve this equation for my assignment:

mg - c x'[t] Abs[x'[t]] = m x''[t]

I'm using

DSolve[{mg - c x'[t] Abs[x'[t]] == m x''[t],x'[0]==0,x[0]==32000},x[t],t]

but Mathematica seems very slow to load.

Questions: is there any other way to solve the equation?

Edit: i've tried to change, but still doesn't work enter image description here

$\endgroup$
  • 1
    $\begingroup$ You should check the boundary conditions: x[0]== 32000 , x'[0] makes no sense! $\endgroup$ – Ulrich Neumann Dec 30 '18 at 12:15
  • $\begingroup$ The defintion of the ode is wrong: mg - c x'[t] Abs[x'[t]] == m x''[t] $\endgroup$ – Ulrich Neumann Dec 30 '18 at 12:17
  • $\begingroup$ i forgot to write x'[0]==0 $\endgroup$ – J. Manopo Dec 30 '18 at 12:29
5
$\begingroup$

If you substitute Abs[x'[t]]->Sqrt[x'[t]^2] mathematica can evaluate the ode

DSolve[{mg - c x'[t] Sqrt[x'[t]^2] == m x''[t] }, x[t], t]

Unfortunately the solution cannot be adapted to the inital conditions x'[0]==0, x[0]== 32000

workaraound

The ode only depends on x'[t],x''[t], the substitution x'[t]->v[t] and division by m gives

ode=9.81 - cdm  v[t] Sqrt[v[t]^2] ==   v'[t] (*g=9.81*)

now the ode only depends on parameters cdm=c/m , v0 and can be solved numerically

V = ParametricNDSolveValue[{ode,v[0] == v0 }, v, {t, 0, 10}, {v0, cdm}]
Plot[Table[V[ 0, cdm  ][t], {cdm, {0, .01, .1, .5, 1, 10}}], {t, 0, 1 }, PlotRange -> {0, Automatic}, PlotLabel -> "variation cdm"]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ i've tried it, but still doesn't work. $\endgroup$ – J. Manopo Dec 30 '18 at 12:39
  • $\begingroup$ The problem seems to be the initial condition x'[0]==0. You give numerical values for the initial conditions, perhaps you can provide the parameter values m, g, ctoo? $\endgroup$ – Ulrich Neumann Dec 30 '18 at 13:01
  • $\begingroup$ m is 70 kg, g is 9.81, c is 0.5 $\endgroup$ – J. Manopo Dec 30 '18 at 18:45
  • $\begingroup$ X = NDSolveValue[{m g - c x'[t] Abs[x'[t]] == m x''[t], x'[0] == 0, x[0] == 32000} /. {m -> 70, g -> 9.81, c -> .5}, x , {t, 0, 10}]; Plot[X[t], {t, 0, 10}, PlotRange -> All] $\endgroup$ – Ulrich Neumann Dec 30 '18 at 18:58
  • $\begingroup$ Thank you so much! $\endgroup$ – J. Manopo Dec 31 '18 at 3:37

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.