- #1

- 4

- 0

## Homework Statement

(d^2y/dx^2) + (dy/dx) = cos x

So you have the trial solution

y= p*cos(x)+q*sin(x)

(dy/dx) = -p*sin(x)+q*cos(x)

(d^2y/dx^2)=-p*cos(x)-q*sin(x)

The issue I am having is equating the coefficients when after I have subbed them into the initial equation:

-p*cos(x)-q*sin(x)-p*sin(x)+q*cos(x)=cos(x)

Equating coefficients of sin x gives -q-p=0

Equating coefficients ofcos x gives -p+q=1

My question is why is

-q*sin(x)-p*sin(x)=cos(x)

= q-p=0

and same for equating for cos x?

Thanks

Olly