My problem is the following: $y'' + 4y = 4\sin(2x)$

I tried making a particular solution to this by assuming that $y = A\sin(2x) + B\cos(2x)$

This gives me the derivate $y' = 2A\cos(2x) - 2B\sin(2x)$ and

The second derivate $y'' = -4A\sin(2x) - 4B\cos(2x)$

If I plug the second derivate and 4 times the equation into the starting problem:

I get: $-4A\sin(2x) - 4B\cos(2x) + 4[A\sin(2x) + B\cos(2x)] = 4\sin(2x) + 0cos(2x)$

As you can see, I get $0 = 4\sin(2x)$, which is impossible because $0$ is not $4$.

I can't find this problem anywhere, how do I go about solving this problem?

  • 2
    $\begingroup$ Hint: You have to choose $y_p = x( a \sin(2x) + b \cos(2x))$ because the homogeneous solution already contains $\sin(2x)$. See tutorial.math.lamar.edu/Classes/DE/…. $\endgroup$ – Moo Mar 4 '17 at 18:47
  • $\begingroup$ the solution is given by $$y \left( x \right) =\sin \left( 2\,x \right) {\it \_C2}+\cos \left( 2 \,x \right) {\it \_C1}-\cos \left( 2\,x \right) x $$ $\endgroup$ – Dr. Sonnhard Graubner Mar 4 '17 at 19:01

I assume you first found your homogeneous solution.

$$y''+4y=0 \quad\implies\quad y_h = A\sin 2x + B\cos 2x$$

Your non-homogeneous equation has a forcing term proportional to $\sin 2x$.

$$y''+4y=4\sin 2x$$

You know that guessing a particular solution of the form $y_p=y_h$ makes the LHS zero, which isn't helpful. But you need the $\sin2x$ to appear on the left. The next best thing would be to incorporate a polynomial factor and hope it gets derived away. i.e., your particular solution is anticipated to be

$$y_p = xy_h = x A\sin2x + x B\cos2x$$


\begin{align} y_p' &= y_h +2x A\cos2x - 2x B\sin2x \\ \\ y_p'' &= y_h' +2 A\cos2x - 2 B\sin2x -4x A\sin2x - 4x B\cos2x \\ &= 4A\cos2x- 4B\sin2x -4x A\sin2x - 4x B\cos2x \\ &= 4(A\cos2x- B\sin2x) -4x y_h \end{align}

Upon substituting the particular solution back into the differential equation, \begin{align} 4(A\cos2x- B\sin2x) -4xy_h + 4xy_h = 4\sin 2x \end{align}

we see that $A=0,B=-1$ in the particular solution. Thus $y_p = -x\cos2x$ and

$$y = c_1\sin2x+c_2\cos2x -x\cos2x$$

  • $\begingroup$ Hey, thanks for the answer, but there is one thing I don't understand. First, you write yp = xyh = xAsin2x+xBcos2x with equals in between the three elements. Then in the next row after a derivation, you add a yh. Why? $\endgroup$ – Slayahh Mar 7 '17 at 10:05
  • $\begingroup$ I noticed the particular solution $y_p = x A\sin2x + x B\cos2x$ was of the form of the homogeneous solutions times $x$, so I started using $y_p=xy_h$ in some places, mainly to tidy up the work. I edited in a few lines to hopefully clarify: Note that $y_p' = y_h + xy_h'$. Effectively, every time you see $y_h$ in the bottom half of the work, substitute it out mentally for $ A\sin2x + B\cos2x$. $\endgroup$ – zahbaz Mar 7 '17 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.