Linear
A first order differential equation is linear when it can be written in form of
$$\frac{dy}{dx}P(x)y-=Q(x)$$
Fact: Where P(x) and Q(x) are functions of x.
To solve it there is a special method:
- We involve two new function of x, call them u and v, and say that
$$y=uv$$
- We then solve to find u, and then find v, and arrange them and we are done!
And we also use the derivative of
$$y=uv$$
(see at Derivative rules:(Product rule))
$$\frac{dy}{dx}=u\frac{dy}{dx}+v\frac{du}{dx}$$
Method
Here is a step-by step procedure for solving them
-
Substitute
$$y=uv$$
and
$$\frac{dy}{dx}=u\frac{dy}{dx}+v\frac{du}{dx}$$
into
$$\frac{dy}{dx}P(x)y=Q(x)$$
- Factor the parts involving v.
- Put the v term equal to zero (this gives a differential equation in u and x which can be solved in the next step).
- Solve using separation of variables find u.
- Substitute u back into the equation we got at step 2.
- Solve that to find v.
- Finally ,substitute u and v into y=uv to get our answer!
Example
$$\frac{dy}{dx}-\frac{y}{x}=1$$
Firstly, check it is linear or not ,Yes,as it is written as:
$$\frac{dy}{dx}+P(x)y=Q(x)$$
Where
$$P(x)=\frac{-1}{x}$$
and Q(x)=1
So, let follow the steps that we have discussed before:
-
Substitute y=uv, and
$$\frac{dy}{dx}=u\frac{dy}{dx}+v\frac{du}{dx}$$
So we have,
$$\frac{dy}{dx}-\frac{y}{x}=1$$
Becomes
$$u\frac{dv}{dx}+v\frac{du}{dx}-\frac{ux}{x}=1$$
-
Factor the parts involving v.
Factor v:
$$y=uv$$
$$y=Kx\frac{1}{x}ln(cx)$$
$$y=xln(cx)$$
-
Put the v term equal to zero (this gives a differential equation in u and x which can be solved in the next step).
$$(\frac{dx}{du}-\frac{u}{x})=0$$
So
$$\frac{du}{dx}=\frac{u}{x}$$
-
Solve using method separation of variables find u.
$$\frac{du}{u}=\frac{dx}{x}$$
$$\int \frac{du}{u}=\int \frac{dx}{x}$$
$$ln(u)=ln(x)+c$$
Where,
$$C=ln(q)$$
$$ln(u)=ln(x)+ln(q)$$
$$u=qx$$
-
Substitute u back into the equation we got at step 2.
Fact: Keep in mind that v term is equal so it can be ignored
$$qx\frac{dv}{dx}=1$$
-
Solve that to find v.
$$kdx=\frac{dx}{x}$$
\int qdv=\int \frac{dx}{x}
$$qv=ln(x)+c$$
Put,
$$C=ln(c)$$
$$qv=ln(x)+ln(c)$$
$$qv=ln(cx)$$
$$v=\frac{1}{q}ln(cx)$$
-
Finally ,substitute u and v into y=uv to get our answer
$$y=uv$$
$$y=kx\frac{1}{x}ln(cx)$$
$$y=xln(c)$$