# Second order and non-linear differential equation

I'm trying to solve the following differential equation

$\ddot{y}(t)=F\cos(\Omega t)-\frac{1}{m}\left(c-\frac{\alpha^2}{R_l+R_i}\right)\dot{y}(t)-\frac{k}{m}y(t)-\frac{k_3}{m}y^3(t)-g$

with initial condition $y(0)=y_0$. Note that the parameters $F,\ \Omega,\ m,\ c,\ \alpha,\ R_l,\ R_i,\ k, \ k_3,\ g$ and $y_0$ are arbitrary.

I tried using the following code

ode:=diff(y(t),t,t)=F*cos(Omega*t)-(c-alpha^2/(R_l+R_i))*(diff(y(t), t))/m-k*y(t)/m-k3*y(t)^3/m-g;

dsolve({ode, y(0) = y0});


in Maple, but I didn't obtain any solution. Can somebody help me?

Thank you, Ana.

• Mathematica DSolve can't solve it either. Do you think this nonlinear ODE has analytical solution? Why not use numerical solver? May 3, 2018 at 8:51
• btw, a second oder ODE needs to initial conditions, not one, for full solution. May 3, 2018 at 8:58
• I guess you are aware that this is the Duffing equation. Analytical solutions are not available you will have to simulate and use the numerical solver.
– Hugh
May 3, 2018 at 17:54

## 1 Answer

Mathematica DSolve can't solve it analytically. But you can try asymptotic approximation solution. I used y[0]==1 and y'[0]==0 below. Change as needed. Here solution expanded around t=0 with 4 terms.

ClearAll[y,t,f,omega,m,g,rL,ri,c,alpha,k,k3];
ode=y''[t]==f*Cos[omega t]-(c-alpha^2/(rL+ri))*y'[t]/m - k*y[t]/m- k3*y[t]^3/m-g;
AsymptoticDSolveValue[{ode,y[0]==1,y'[0]==0},y[t],{t,0,4}]