First Order Differential Equations

2.2 Linear First-Order Differential Equations

A first-order differential equation is classified as linear if it can be written as

 [asciimath]y' + p(x) y = q(x)[/asciimath]. (2.2.1)

A first-order differential equation that cannot be expressed in that form is called nonlinear. If [asciimath]q(x)=0[/asciimath], the equation is said to be homogeneous. In contrast, if [asciimath]q(x)[/asciimath] is not zero, the equation is nonhomogeneous. Homogeneous equations always have the trivial solution [asciimath]y=0[/asciimath]. Solutions that are not zero are referred to as nontrivial solutions.

Some equations may not appear to be linear at first, such as [asciimath]x^3 y' + ln(x) y = 2sin(x)[/asciimath] but can be rearranged into the standard linear form:

[asciimath]y'+ln(x)/x^3 y = (2sin(x))/x^3[/asciimath].

Theorem:  If [asciimath]p(x)[/asciimath] and [asciimath]q(x)[/asciimath] in Equation 2.2.1 are continuous on some open interval (a,b), then there’s a unique formula [asciimath]y = y(x,c)[/asciimath] that is the general solution to the differential equation.

In our discussions within this text, we will not always explicitly mention the interval when seeking the general solution of a specific linear first-order equation. By default, this implies that we are looking for the general solution on every open interval where the functions and in the equation are continuous.

To solve Equation 2.2.1, we start by assuming that the solution can be expressed as , where is a known solution to the corresponding homogeneous equation (called complementary equation), and [asciimath]v(x)[/asciimath] is an unknown function we aim to determine. This approach is part of a technique called variation of parameters, which is particularly useful for finding solutions to nonhomogeneous differential equations. We will explore this technique more thoroughly in the context of second-order differential equations. Substituting the guessed solution into the equation yields

 [asciimath]v'y_1+y'_1v+p(x)(vy_1)=q(x)[/asciimath]

By simplifying and rearranging, we obtain

 [asciimath]v'y_1+v(y'_1+p(x)y_1)=q(x)[/asciimath]

Since is a solution to the complementary equation, , simplifying the expression to . Integrating both sides allows us to determine [asciimath]v(x)=int(q(x))/(y_1(x))dx+C[/asciimath] , leading to the solution for Equation 2.2.1 as

Now that we understand the derivation of the solution, let’s outline the solution process in the following steps.

 

How to Solve Linear First-Order Equations

1. Write the equation in the standard form.

[asciimath]dy/dx + p(x) y = q(x)[/asciimath]

2. Calculate the integrating factor letting the constant of integration be zero for convenience.

 [asciimath]u(x)=e^(int p(x) dx)[/asciimath]

3. Integrate the right-hand side equation and simplify where possible. Ensure you properly deal with the constant of integration.

 [asciimath]y(x)=1/(u(x))[int u(x)q(x)dx+C][/asciimath]

Occasionally, the function [asciimath]u(x)[/asciimath] may not be integrable in a straightforward manner. In that case, it is necessary to retain the function in its integral form instead of attempting to find an explicit solution.

 

Example 2.2.1: Solve a Linear Equation

Find the general solution to

 [asciimath]1/x dy/dx-(2y)/x^2=xcosx[/asciimath] ,   [asciimath]x>0[/asciimath]

Show/Hide Solution

 

1. First, we multiply by [asciimath]x[/asciimath] to put the equation in the standard form:

 [asciimath]dy/dx-2/x y=x^2cosx[/asciimath]

So [asciimath]p(x)=-2/x[/asciimath] and [asciimath]q(x)=x^2cosx[/asciimath]

2. Thus, the integrating factor is

 [asciimath]u(x)=e^(int p(x)dx)=e^(int -2/x dx)=e^(-2ln|x|)=x^-2[/asciimath]

3. Substituting into the general formula, we obtain

 [asciimath]y(x)=1/(u(x))[int u(x)q(x)dx+C][/asciimath]

 [asciimath]=1/(x^-2)int x^-2. x^2 cosx dx[/asciimath]

 [asciimath]=x^2intcosx dx[/asciimath]

 [asciimath]=x^2(sinx +C)[/asciimath]

[asciimath]=x^2sinx+Cx^2[/asciimath]

Figure 2.2.1 depicts the sketches of the solutions for various values of constant [asciimath]C[/asciimath] for the above example.

Figure 2.2.1 Graph of [asciimath]y=x^2 sinx+Cx^2[/asciimath] for different values of constant [asciimath]C[/asciimath]

 

Try an Example

 

Theorem – Existence and Uniqueness of solution: If [asciimath]p(x)[/asciimath] and [asciimath]q(x)[/asciimath] are continuous on [asciimath](a,b)[/asciimath], then

a) The general solution to the nonhomogeneous equation is [asciimath]y(x)=1/(u(x))[int u(x)q(x)dx+C][/asciimath]

b) If [asciimath]x_0[/asciimath] is an arbitrary point in [asciimath](a,b)[/asciimath] then the initial value problem has a unique solution on [asciimath](a,b)[/asciimath]

 

Example 2.2.2: Solve an IVP Problem

Solve the initial problem

 [asciimath]dy/dx=y/(x+1)+4x^2+4x[/asciimath] ,   [asciimath]y(1)=-6[/asciimath]

Show/Hide Solution

 

Find the general solution:

1. First, we rearrange the equation to put it in the standard form:

 [asciimath]dy/dx-1/(x+1)*y=4x^2+4x[/asciimath]

Therefore, [asciimath]p(x)=-1/(x+1)[/asciimath]  and [asciimath]q(x)=4x(x+1)[/asciimath] .

2. The integrating factor is

 [asciimath]u(x)=e^(int p(x)dx)=e^(int -1/(x+1) dx)=e^(-ln|x+1|)=(x+1)^-1[/asciimath]

3. Substituting into the general formula for the solution, we obtain

 [asciimath]y(x)=1/(u(x))[int u(x)q(x)dx+C][/asciimath]

 [asciimath]=1/((x+1)^-1)int (x+1)^-1. 4x(x+1)dx[/asciimath]

 [asciimath]=(x+1)int4x dx[/asciimath]

 [asciimath]=(x+1)(2x^2 +C)[/asciimath]

Apply the initial condition to find C:

[asciimath]y(1)=-6[/asciimath] 

 [asciimath](1+1)(2(1^2)+C)=-6[/asciimath] 

 [asciimath]2(2+C)=-6[/asciimath] 

 [asciimath]2+C=-3[/asciimath] 

[asciimath]C=-5[/asciimath] 

The solution to the IVP problem then is

 [asciimath]y(x)= (x+1)(2x^2 -5)[/asciimath]

 

Try an Example

 

Section 2.2 Exercises

  1. Find the simplest integrating factor [asciimath]u (x)[/asciimath] of equation  [asciimath]-x y' = (7x+5)y+xsec(x)[/asciimath].
    Show/Hide Answer

     

     [asciimath]u(x)=x^5e^(7x)[/asciimath]

  2. Find the general solution of the differential equation:  [asciimath]y' -2 y = e^(4 x)[/asciimath]
    Show/Hide Answer

     

    [asciimath]y(x)=1/2 e^(4x)+Ce^(2x)[/asciimath]

  3. Find the general solution of the differential equation:  [asciimath]dy/dt-4/t y = t^5[/asciimath]
    Show/Hide Answer

     

    [asciimath]y(t)=1/2t^6+C t^(4)[/asciimath]

  4. Solve the initial value problem: [asciimath]xy'+2y=8x^2[/asciimath]  with the initial condition [asciimath]y(1) = 3[/asciimath]
    Show/Hide Answer

     

    [asciimath]y(x)=1/x^2(1+2x^4)[/asciimath]

  5. Solve the initial value problem: [asciimath]dy/dt=y/(t+1)+4t^2+4t\ ,[/asciimath]     [asciimath]y(1)=7[/asciimath]
    Show/Hide Answer

     

     [asciimath]y(t)=(2t^2+3/2)(t+1)[/asciimath]

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Differential Equations Copyright © 2024 by Amir Tavangar is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book