# y'+\frac{1}{x}y=\cos (x)

$$\displaystyle{y}'+{\frac{{{1}}}{{{x}}}}{y}={\cos{{\left({x}\right)}}}$$

• Questions are typically answered in as fast as 30 minutes

### Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

vrangett
Given: $$\displaystyle{y}'+{\frac{{{1}}}{{{x}}}}{y}={\cos{{x}}}$$
Solution:
$$\displaystyle{y}^{{{1}}}+{\frac{{{1}}}{{{x}}}}{y}={\cos{{x}}}$$
comparing with the equation
$$\displaystyle{y}'+{p}{\left({x}\right)}{y}={q}{\left({x}\right)}$$
$$\displaystyle{p}{\left({x}\right)}={\frac{{{1}}}{{{x}}}},{q}{\left({x}\right)}={\cos{{x}}}$$
$$\displaystyle{M}=\text{Integrating factor}={e}^{{\int{p}{\left({x}\right)}{\left.{d}{x}\right.}}}$$
$$\displaystyle={e}^{{\int{\frac{{{1}}}{{{x}}}}{\left.{d}{x}\right.}}}$$
$$\displaystyle={e}^{{{\ln{{x}}}}}$$
$$\displaystyle{m}={x}$$
general solution is,
$$\displaystyle{y}_{{{m}}}=\int{q}{\left({x}\right)}{m}\ {\left.{d}{x}\right.}+{c}$$
$$\displaystyle{y}_{{{x}}}=\int{\cos{{x}}}\cdot{x}\ {\left.{d}{x}\right.}+{c}$$
$$\displaystyle{x}{y}={x}\int{\cos{{x}}}\ {\left.{d}{x}\right.}-\int{\left[{\frac{{{d}{\left({x}\right)}}}{{{\left.{d}{x}\right.}}}}\int{\cos{{x}}}\ {\left.{d}{x}\right.}\right]}{\left.{d}{x}\right.}$$
$$\displaystyle{x}{y}={x}{\sin{{x}}}-\int{1}\cdot{\sin{{x}}}{\left.{d}{x}\right.}$$
$$\displaystyle{x}{y}={x}{\sin{{x}}}-\int{\sin{{x}}}{\left.{d}{x}\right.}$$
$$\displaystyle{x}{y}={x}{\sin{{x}}}-{\left(-{\cos{{x}}}\right)}+{c}$$
$$\displaystyle{x}{y}={x}{\sin{{x}}}+{\cos{{x}}}+{c}$$
###### Not exactly what youâ€™re looking for?
yotaniwc
$$\displaystyle{y}'+{\frac{{{1}}}{{{x}}}}{y}={\cos{{x}}}$$
Integrating factor $$\displaystyle{P}{\left({x}\right)}={\frac{{{1}}}{{{x}}}}$$
$$\displaystyle{e}^{{\int{\frac{{{1}}}{{{x}}}}{\left.{d}{x}\right.}}}={e}^{{{\ln}{\left|{x}\right|}}}={x}$$
$$\displaystyle{x}{\frac{{{\left.{d}{y}\right.}}}{{{\left.{d}{x}\right.}}}}={x}{\cos{{x}}}$$
$$\displaystyle{\left[{x}{y}\right]}{\frac{{{d}}}{{{\left.{d}{x}\right.}}}}={x}{\cos{{x}}}$$
$$\displaystyle{x}{y}=\int{x}{\cos{{x}}}$$
$$\displaystyle{x}{y}={x}{\sin{{x}}}+{\cos{{x}}}+{c}$$
$$\displaystyle{y}={\frac{{{x}{\sin{{x}}}+{\cos{{x}}}+{c}}}{{{x}}}}$$
$$\displaystyle{y}={\sin{{x}}}+{\frac{{{\cos{{x}}}}}{{{x}}}}+{\frac{{{c}}}{{{x}}}}$$