How can I check that $\;y=\dfrac{\sin x}{x}\;$ is a solution of $\;xy'+y=\cos x\;$?
Check $\;y=\dfrac{\sin x}{x}\;$ is solution of $\;xy'+y=\cos x\;$
-
0Ah yea..Of course. Sometimes the solution is so simple that I tend to overlook it. Thanks. – 2012-12-17
5 Answers
Using the quotient rule for differentiation, we have $xy'+y=x\left(\frac{x\cos x-\sin x}{x^2}\right)+y=\cos x-\frac{\sin x}{x}+\frac{\sin x}{x}=\cos x.$
-
0Very nice, thank you. – 2012-12-17
Compute $y'$ using $y=\dfrac{\sin x}{x},\tag{1}$
Substitute your result, $y'$, into the equation $xy'+y=\cos x,\tag{2}$
Evaluate, and check to confirm that the left-hand side of $(2)$ equals the right-hand side of $(2)$.
One can always check whether a function "works" by substituting. In this case, we can do better. For note that $xy'+y=(xy)'$. So our equation can be rewritten as $(xy)'=\cos x.$ Integrate. We get $xy'=\sin x +C$ and therefore the general solution is $\frac{\sin x +C}{x}.$
In case you wanted to know how to arrive at the solution. Since this is a linear equation of order one:
$y'x+y=\cos x\Longrightarrow y'+\frac{1}{x}y=\frac{\cos x}{x}$
We now put
$\mu(x):=e^{\int\frac{dx}{x}}=e^{\log x}=x\Longrightarrow$
The general solution is
$y=\frac{1}{x}\left(\int\frac{\cos x}{x}\cdot e^{\int\mu(x)dx}dx\right)+C=\frac{1}{x}\int\cos xdx+C=\frac{\sin x}{x}+C\,\,,\,C=\,\text{a constant}$
Just differentiate $\Rightarrow xy=\sin(x)$
applying uv rule on L.H.S and $\sin$ derivative on R.H.S
$\Rightarrow xy'+ y=\cos( x)$