Question

# Solve differential equation dy/dx+(a/x)y=40x, for x>0 and y(1)=a

First order differential equations

Solve differential equation $$\frac{dy}{dx}+(\frac{a}{x})y=40x$$, for $$x>0$$ and $$y(1)=a$$

2021-03-10

$$\frac{dy}{dx}+P(x)\times y= Q(x)$$
$$I.F.=e(\int Pdx)$$
$$y(I.F.)= \int Qx(I.F.)dx+C$$
$$P(x)= \frac{a}{x}$$
$$Q(x)= 40x$$
$$I.F.= e(\int \frac{a}{x} dx)= e^{a \ln x}=e^{\ln x^a}=x^a$$
$$y(I.F.)= \int(40x)(I.F.)dx + C$$
$$y(x^a)= \int(40x)(x^a)dx + C$$
$$y x^a= 40 \int x^{a+1}dx+C$$
$$y x^a= 40\times \frac{x^2+1+1}{a+1+1}+C$$
$$y x^a= 40\times\frac{x^{a+2}}{a+2}+C$$
$$y= \frac{40}{a+2}\times \frac{x^{a+2}}{x^a}+\frac{C}{x^a}$$
$$y= \frac{40}{a+2}\times x^2+\frac{C}{x^a}$$ (1)
$$y(1)=a$$
Put $$x=1$$ and $$y=a$$ into equation (1)
$$a= \frac{40}{a+2}(1)^2+\frac{C}{1^a}$$
$$a= \frac{40}{a+2}+C$$
$$C= a-\frac{40}{a+2}$$
$$C= \frac{a(a+2)-40}{a+2}$$
$$C= \frac{a^2+2a-40}{a+2}$$ Put the value of C into equation (1) $$y= \frac{40}{a+2} x^2+\frac{a^2+2a-40}{a+2}\times \frac{1}{x^a}$$