# solve second order differential equation numerically

I want to solve this equation numerically and plot x[t],t relation. x '' [t] == - [ ( ( ( Q ^ 2 - 2 m ^ 2 ) ( 2 m t - Q ^ 2 ) ^ 2 / (
2 m ^ 2 t ^ 3 ( t - 2 m ) ( m t - Q ^ 2 ) ) ) / ( 2 ) ] x [ t ]

• What is Q,m? What have you tried? You probably want NDSolve. – Marius Ladegård Meyer Apr 14 '17 at 10:37
• Yes.Can I plot this DE by considering Q=0.4 and m=1.I have chosen these two values arbitrary. – Emlie Apr 14 '17 at 17:56
• @Emlie What are the two initial/boundary conditions? – zhk Apr 15 '17 at 8:04
• @Emlie Did you saw my answer? – zhk May 1 '17 at 14:14
• Yes. I am working on it. – Emlie May 2 '17 at 8:36

There are many issues with your differential equations.

1. Initial/boundary conditions are missing.
2. For numerical solution (which seems to be the only way to solve your ode), numerical values for the parameters Q and m are missing.
3. Your ODE, involves $\frac{1}{t^3}$, $\frac{1}{(t-2m)}$ and $\frac{1}{(mt - Q^2)}$, so for $t=0$, $t=2m$ and $t=\frac{Q^2}{m}$, we are facing $\frac{1}{0}$.

Here is a sample code for you to play with,

ode = x''[t] == -(((Q^2 -2*m^2)*(2*m*t - Q^2)^2/(2*m^2*t^3*(t - 2*m)*(m*t-Q^2)))/(2))*x[t];
sol = ParametricNDSolve[{ode, x[10^(-5)] == a, x'[10^(-5)] == b},
x, {t, 10^(-5), 10}, {Q, m, a, b}];
Plot[Evaluate[x[1, 1, 0, 10][t] /. sol], {t, 10^-5, 1}]