0
$\begingroup$

How do you solve the following inhomogeneous differential equation:

$$ y' + y\cos x = \sin x \cos x ?$$

I determined the homogeneous solution ($y_h=Ce^{-\sin x})$, but how do I find the particular solution? I tried using the ansatz $y_p = (P \sin x + Q\cos x)(S\sin x + Z\cos x)$, but this approach failed (I didn't succeed at least). What is the most bright approach? Thanks for any help!

$\endgroup$
  • 1
    $\begingroup$ The ODE is linear in $y$. Have you attempted to find an integrating factor? $\endgroup$ – user170231 Jul 12 '15 at 22:56
  • $\begingroup$ This should work. $\endgroup$ – Git Gud Jul 12 '15 at 22:56
2
$\begingroup$

$${ y }^{ \prime }+y\cos { x } =\sin { x } \cos { x } $$ $$\Downarrow $$ $${ y }\prime +y\cos { x } =0$$ $$\Downarrow $$ $$\frac { dy }{ dx } =-y\cos { x } $$ $$\Downarrow $$ $$\int { \frac { dy }{ y } } =-\int { \cos { x } dx } $$ $$\Downarrow $$ $$ lny+{ C }_{ 1 }=-\sin { x } +C_{ 2 }$$ $$\Downarrow $$ $$ y={ Ce }^{ -\sin { x } }$$ $$\Downarrow $$ $$ y=C\left( x \right) { e }^{ -\sin { x } }$$ $$\Downarrow$$ $$ { y }\prime =C\prime \left( x \right) { e }^{ -\sin { x } }-C\left( x \right) \cos { x } { e }^{ -\sin { x } }$$ $$\Downarrow$$ $$C\prime \left( x \right) { e }^{ -\sin { x } }-C\left( x \right) \cos { x } { e }^{ -\sin { x } }+C\left( x \right) \cos { x } { e }^{ -\sin { x } }=\sin { x } \cos { x } $$ $$\Downarrow$$ $$C\prime \left( x \right) { e }^{ -\sin { x } }=\sin { x } \cos { x } $$ $$\Downarrow$$ $$C\prime \left( x \right) ={ e }^{ \sin { x } }\sin { x } \cos { x } $$ $$\Downarrow$$

$$C\left( x \right) =\int { { e }^{ \sin { x } }\sin { x } \cos { x } dx } =\int { \sin { x } d } { e }^{ \sin { x } }={ e }^{ \sin { x } }\sin { x } -\int { { e }^{ \sin { x } }\cos { xdx } } ={ e }^{ \sin { x } }\sin { x } -\int { d{ e }^{ \sin { x } } } ={ e }^{ \sin { x } }\left( \sin { x } -1 \right) +C$$ finally $$ y={ e }^{ -\sin { x } }\left[ { e }^{ \sin { x } }\left( \sin { x } -1 \right) +C \right] =\sin { x } -1+{ Ce }^{ -\sin { x } }$$

| cite | improve this answer | |
$\endgroup$
4
$\begingroup$

Use the integrating factor $$\mu(x) = \exp\left\{\int \cos(x)\ dx\right\} = e^{\sin(x)}.$$

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

make the ansatz $y_p=A\sin(x)+B\cos(x)+C_1$ where $A,B,C_1$ are real numbers

| cite | improve this answer | |
$\endgroup$
0
$\begingroup$

You could use $y_p=A\sin x+B$

this gives the equation $A\cos x+(A\sin x+B)\cos x=\sin x\cos x$.

| cite | improve this answer | |
$\endgroup$

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.