0

I have a differential equation that I want solved using initial conditions.

The differential equation is:

DSolve[{y''[x] == (g (A*y[x]*p - m))/m}, y[x], x] 

which outputs {{y[x] -> m/(A p) + E^((Sqrt[A] Sqrt[g] Sqrt[p] x)/Sqrt[m]) C[1] + E^(-((Sqrt[A] Sqrt[g] Sqrt[p] x)/Sqrt[m])) C[2]}}

I want to have the initial conditions y'[0]==0, y[0]==0. When putting in:

DSolve[{y''[x] == (g (A*y[x]*p - m))/m, y'[0] == 0, y[0] == 0} , y[x], x]

I get the error message DSolve::deqn: Equation or list of equations expected instead of True in the first argument {(y'')[x]==(g (-m+A p y[x]))/m,True,True}.

I'm not sure where I'm going wrong with it as it looks exactly what the mathematica examples have with initial conditions.

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
  • 4
    Works fine on my Mac using v11.2, Start with a fresh kernel. You probably have some old definitions hanging around. – Bob Hanlon Oct 09 '18 at 02:13
  • 1
    As @BobHanlon, make sure that all the symbols to be used are fresh. To that end, one method is to put this code before DSolve: Clear[y, g, A, p, m, x]. – Αλέξανδρος Ζεγγ Oct 09 '18 at 04:05
  • This works fine in my computer too. For possible reason of this error, you may have a look at this: https://mathematica.stackexchange.com/questions/80210/error-with-using-ndsolve – Schrodinger Oct 09 '18 at 05:37
  • If I run the same thing on my computer: DSolve[{y''[x] == (g (Ay[x]p - m))/m, y'[0] == 0, y[0] == 0} , y[x], x], Then I get the solution without any warning as:$$\left{\left{y(x)\to -\frac{m e^{-\frac{\sqrt{A} \sqrt{g} \sqrt{p} x}{\sqrt{m}}} \left(e^{\frac{\sqrt{A} \sqrt{g} \sqrt{p} x}{\sqrt{m}}}-1\right)^2}{2 A p}\right}\right}$$ – Schrodinger Oct 09 '18 at 05:38

0 Answers0