# Non linear ordinary differential equation

How to solve the ordinary differential equation $\frac{d^2y}{dx^2}+\sin(x+y)=\sin x,y(0)=0,y'(0)=1$

Then its possible to solve it by numerical methods?

-
I doubt an exact solution exists. – David H Aug 17 '14 at 23:56
Given that it's a highly non-linear ODE, the dependence on boundary conditions / initial values is quite sensitive. – Semiclassical Aug 18 '14 at 0:17
@Semiclassical Why do you consider it highly nonlinear? The nonlinear part does not involve derivatives of unknown function, and is uniformly Lipschitz. This is as close to linear as one might hope. – Bookend Aug 18 '14 at 0:26

Yes, you can easily solve this using available numerical solvers. As an example, I will use Sage since it's available online and is free. First step is to convert to first-order linear system by introducing another unknown $u=y'$: $$y'=u,\quad u'=\sin x-\sin(x+y)$$ The rest is up to Sage:

var('x y u')
P=desolve_system_rk4([u,sin(x)-sin(x+y)],[y,u],ics=[0,0,1],ivar=x,end_points=30)
list_plot([ [i,j] for i,j,k in P])


Pretty neat plot:

It does some other weird things later on, as you can see by increasing the end_points parameter.

-