# Thread: Plotting a second order differential equation

1. ## Plotting a second order differential equation

Hi,

I'm trying to plot d^2y/dx^2=-y.

I think that the way forward is to solve the equation to get one in terms of x and y (but maybe there is a better way?). This gives me the auxiliary quadratic
(m^2) -1=0, so m=±i

So the complimentary function is of the form y=Acosx+Bsinx.

But now I am stuck... I don't know how to find the particular integral. I used the trial solution y=λxsinx but didn't get anywhere.

Thanks

2. Typically, for plotting solutions for a DE, you need initial or boundary conditions in order to eliminate the arbitrary constants that, since you're always integrating to solve a DE, always show up. If you have initial conditions, then plug those in and get yourself a system of two equations in two unknowns in order to solve for A and B. Make sense?