Solve y"+y=cos^2(x) please, help
just x_p
by variation parameter
Does it help if you use \(\cos^2(x) = \frac{\cos(2x) + 1}{2}\)?
\[x_p=-\int sinx cos^2x dx *cosx +\int cos^3x dx sinx\]
for the first part, I let u = cos x, du = -sinx dx that gives me \(\dfrac{cos^3x}{3}\) .Am I right so far?
For the second part, the integrand becomes \(cos x (1-sin^2 x) = cos x -cosx sin^2x\) Hence \[\int( cosx -cosxsin^2x)dx *cos x\]
sorry, *sinx at the end
Hence it is \[sin^2 x -\int cosx sin^2x dx *sinx\]
Let u = sin x, du = cos x dx I got \(\dfrac{sin^4x}{3}\) All in
\[\dfrac{cos^4x}{3}-\dfrac{sin^4x}{3}+sin^2x\]
now, manipulate the first 2 terms. \((1/3) (cos^2 x)^2 -(sin^2 x)^2=(1/3) (cos^2 x-sin^2x)(cos^2x +sin^2x) \\=(1/3)( cos^2x -sin^2x)= (1/3)cos (2x)\)
so at the end, I got \((1/3)cos(2x) +sin^2x\) but wolfram gives me https://www.wolframalpha.com/input/?i=y%22%2By%3Dcos%5E2(x) why?
You are correct I guess. It's because of \(\cos(2a) = 2\cos^2(a) - 1 = \cos^2a-\sin^2a =1 - 2\sin^2(a)\). Therefore, \(\sin^2a = \frac{1-\cos(2a)}{2}\) and \(\frac13 \cos(2x) + \sin^2(x) = \frac13 \cos^2(x) + \frac12 - \frac12 \cos(2x) = \frac12 - \frac16 \cos(2x)\).
oh, so, just manipulate further and I will get what wolfram did, right? Thanks so much.
Yes, that happens often with the trigonometric functions. :-) Sometimes the "error" is hidden in the integrating function so that \(\cos^2(x)\) and \(2\cos^2(x)\) are "equal" (up to a constant).
integrating constant *
typo.. \(\cos(2x)\) and \(2\cos^2(x)\)
Got you. Thanks a lot.
Join our real-time social learning platform and learn together with your friends!