Question: How can I get the desired answer from "solve"

I compute the solution of this differential system

shock := piecewise(t <0, 0, t < 1, 10, 0):
sys   := {(M__p+M__a)*diff(x(t), t$2)=M__p*shock-x(t), x(0)=0, D(x)(0)=0}
sol   := unapply(rhs(dsolve(sys)), (M__p,M__a))

I'm interested in 3 quantities:

  • the first time tend > 0 such that sol(tend) = 0,
  • the time tmax in (0..tend) where sol(tmax) reaches its maximum value,
  • the value xmax = sol(tmax).

Since sol has a relatively simple expression, I first attempted to use solve for calculating tend, but that didn't work.
The conclusion is still the same for tmax and xmax.

The values of these 3 quantities that I expect solve to provide, are those obtained using fsolve.

Can you explain me the failures I faced and show me how to force solve to get these values?

Please Wait...