- #1
dooogle
- 21
- 0
Homework Statement
integrate
dy/dx-y=cos(x)-2
Homework Equations
The Attempt at a Solution
dy/dx-y=cos(x)-2
is in the form
dy/dx+p(x)=q(x)
take the I.F as e^int(p(x))dx=e^-x
multiplying throughout by e^-x
d(e^-x)z/dx=-(cos(x)e^-x)-(2e^-x)
(e^-x)z=-int((cos(x)e^-x)-(2e^-x))dx
so -int((cos(x)e^-x)-(2e^-x))dx=-int(cos(x)(e^-x)dx-2int(e^-x)dx
2int(e^-x)dx=-2(e^-x)+c
-int(cos(x)(e^-x)) this is where i have trouble I am not sure if my method is correct using integration by parts multiple times
1st integration
let u=e^(-x) du/dx=-e^(-x) dv/dx=cos(x) v=-sin(x)
-int(cos(x)(e^-x))dx = -e^(-x)sin(x)+int(-sin(x)e^(-x))dx
2nd integration
int(-sin(x)e^(-x))dx
let u=e^(-x) du/dx=-e^(-x) dv/dx=-sin(x) v=cos(x)
e^(-x)cos(x)+int(cos(x)(e^-x))dx
so
-int(cos(x)(e^-x)dx=-e^(-x)sin(x)+e^(-x)cos(x)+int(cos(x)(e^-x))dx
this is where I am not sure i take away from both sides int(cos(x)(e^-x))dx giving
-2int(cos(x)(e^-x)dx=-e^(-x)sin(x)+e^(-x)cos(x)
int(cos(x)(e^-x)dx=e^(-x)/2(sin(x)+cos(x))
so
(e^-x)z=-2(e^-x)+c+e^(-x)/2(sin(x)+cos(x))+c
z=-2+(sin(x)+cos(x))/2+c/(e^-x)
1/y=-2+(sin(x)+cos(x))/2+c/(e^-x)
y=1/(-2+(sin(x)+cos(x))/2+c/(e^-x))
thank you for your time to recap my problems is:
im not sure if i am allowed to add integrals
cheers
dooogle