Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I check that $\;y=\dfrac{\sin x}{x}\;$ is a solution of $\;xy'+y=\cos x\;$?

share|cite|improve this question
Take the derivative of y and then check that the left side equals the right side (you might have to do some simplifications and algebra). Make sense? – Amzoti Dec 17 '12 at 1:14
Ah yea..Of course. Sometimes the solution is so simple that I tend to overlook it. Thanks. – Kyle H Dec 17 '12 at 1:18
up vote 8 down vote accepted

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.$$

share|cite|improve this answer
Very nice, thank you. – Kyle H Dec 17 '12 at 1:15

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)$.

share|cite|improve this answer
Thanks for the help! – Kyle H Dec 17 '12 at 1:31

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}.$$

share|cite|improve this answer

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}$$

share|cite|improve this answer

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)$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.