- #1

zonk

- 44

- 0

## Homework Statement

20) Determine the general solution of y'' + y = sin(x).

## Homework Equations

## The Attempt at a Solution

We attempt to solve this equation by the method of undetermined constants.

So y = u(x)sin(x) (such a substitution should reduce R(x) to a polynomial with a u-differential equation with constant coefficients according to Apostol. )

We get, after differentiation and substitution:

u'' + 2cot(x)u = 1

However, this equation doesn't have constant coefficients like Apostol said the method would produce. So I need some help there.

Doing it the regular way with variation of parameters, we have:

y = c

_{1}sin(x) + c

_{2}cos(x) + y

_{1}

where y

_{1}= t

_{1}(x)v

_{1}(x) + t

_{2}(x)v

_{2}(x) and

v

_{1}(x) = sin(x)

v

_{2}(x) = cos(x)

The wronskian of the two functions is -1.

After computing we get

t

_{1}= [itex]\frac{1}{2} {sin}^2(x)[/itex]

t

_{2}= [itex]\frac{sin(2x)}{4} - \frac{1}{2}x[/itex]

So the general solution is

y = [itex]sin(x) (c_1 + \frac{{sin}^2(x)}{2}) + cos(x) (c_2 + \frac{sin(2x)}{4} - \frac{1}{2}x)[/itex]

But the book says the answer is:

y = [itex](c_1 - \frac{1}{2}x)cos(x) + c_2{sin(x)}[/itex]

Why do I keep getting extra terms?

Edit: Never mind the second question. My solution simplifies to the book's general solution. Tricky, but I see it.

Last edited: