Write differential equation in standard form

We now develop a solution technique for any first-order linear differential equation. We start with the standard form of a first-order linear differential equation:

[latex]y^ <\prime>+p\left(x\right)y=q\left(x\right)[/latex].

The first term on the left-hand side of [latex]^<\prime >+\fracy=\frac[/latex] is the derivative of the unknown function, and the second term is the product of a known function with the unknown function. This is somewhat reminiscent of the power rule from the Differentiation Rules section. If we multiply [latex]^<\prime >+p\left(x\right)y=q\left(x\right)[/latex] by a yet-to-be-determined function [latex]\mu \left(x\right)[/latex], then the equation becomes

[latex]\mu \left(x\right)^<\prime >+\mu \left(x\right)p\left(x\right)y=\mu \left(x\right)q\left(x\right)[/latex].

The left-hand side of [latex]y^ <\prime>+p\left(x\right)y=q\left(x\right)[/latex] can be matched perfectly to the product rule:

Matching term by term gives [latex]y=f\left(x\right),g\left(x\right)=\mu \left(x\right)[/latex], and [latex]^<\prime >\left(x\right)=\mu \left(x\right)p\left(x\right)[/latex]. Taking the derivative of [latex]g\left(x\right)=\mu \left(x\right)[/latex] and setting it equal to the right-hand side of [latex]^<\prime >\left(x\right)=\mu \left(x\right)p\left(x\right)[/latex] leads to

[latex]<\mu >^<\prime >\left(x\right)=\mu \left(x\right)p\left(x\right)[/latex].

This is a first-order, separable differential equation for [latex]\mu \left(x\right)[/latex]. We know [latex]p\left(x\right)[/latex] because it appears in the differential equation we are solving. Separating variables and integrating yields

Here [latex]_[/latex] can be an arbitrary (positive or negative) constant. This leads to a general method for solving a first-order linear differential equation. We first multiply both sides of [latex]^<\prime >+p\left(x\right)y=q\left(x\right)[/latex] by the integrating factor [latex]\mu \left(x\right)[/latex]. This gives

[latex]\mu \left(x\right)^<\prime >+\mu \left(x\right)p\left(x\right)y=\mu \left(x\right)q\left(x\right)[/latex].

The left-hand side of the above equation can be rewritten as [latex]\frac\left(\mu \left(x\right)y\right)[/latex].

[latex]\frac\left(\mu \left(x\right)y\right)=\mu \left(x\right)q\left(x\right)[/latex].

Next integrate both sides with respect to [latex]x[/latex].

Divide both sides by [latex]\mu \left(x\right)\text[/latex]

[latex]y=\dfrac<1><\mu \left(x\right)>\left[\displaystyle\int \mu \left(x\right)q\left(x\right)dx+C\right][/latex].

Since [latex]\mu \left(x\right)[/latex] was previously calculated, we are now finished. An important note about the integrating constant [latex]C\text[/latex] It may seem that we are inconsistent in the usage of the integrating constant. However, the integral involving [latex]p\left(x\right)[/latex] is necessary in order to find an integrating factor for [latex]^<\prime >+\fracy=\frac[/latex]. Only one integrating factor is needed in order to solve the equation; therefore, it is safe to assign a value for [latex]C[/latex] for this integral. We chose [latex]C=0[/latex]. When calculating the integral inside the brackets in [latex]\frac\left(\mu \left(x\right)y\right)=\mu \left(x\right)q\left(x\right)[/latex], it is necessary to keep our options open for the value of the integrating constant, because our goal is to find a general family of solutions to [latex]^<\prime >+\fracy=\frac[/latex]. This integrating factor guarantees just that.

Problem-Solving Strategy: Solving a First-order Linear Differential Equation

  1. Put the equation into standard form and identify [latex]p\left(x\right)[/latex] and [latex]q\left(x\right)[/latex].
  2. Calculate the integrating factor [latex]\mu \left(x\right)=^<\displaystyle\int p\left(x\right)dx>[/latex].
  3. Multiply both sides of the differential equation by [latex]\mu \left(x\right)[/latex].
  4. Integrate both sides of the equation obtained in step [latex]3[/latex], and divide both sides by [latex]\mu \left(x\right)[/latex].
  5. If there is an initial condition, determine the value of [latex]C[/latex].

Example: Solving a First-order Linear Equation

Find a general solution for the differential equation [latex]xy^ <\prime>+3y=4^-3x[/latex]. Assume [latex]x>0[/latex].

Show Solution
  1. To put this differential equation into standard form, divide both sides by [latex]x\text[/latex]
[latex]y^ <\prime>+\fracy=4x - 3[/latex]. Analysis

You may have noticed the condition that was imposed on the differential equation; namely, [latex]x>0[/latex]. For any nonzero value of [latex]C[/latex], the general solution is not defined at [latex]x=0[/latex]. Furthermore, when [latex]x<0[/latex], the integrating factor changes. The integrating factor is given by [latex]\mu \left(x\right)^<\prime >+\mu \left(x\right)p\left(x\right)y=\mu \left(x\right)q\left(x\right)[/latex] as [latex]f\left(x\right)=^<\displaystyle\int p\left(x\right)dx>[/latex]. For this [latex]p\left(x\right)[/latex] we get

[latex]^<\displaystyle\int p\left(x\right)dx=>^<\displaystyle\int \left(\frac\right)dx>=^|x|>=<|x|>^[/latex],

Watch the following video to see the worked solution to Example: Solving a First-Order Linear Equation.

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

try it

Find the general solution to the differential equation [latex]\left(x - 2\right)y^ <\prime>+y=3^+2x[/latex]. Assume [latex]x>2[/latex].

Use the method outlined in the problem-solving strategy for first-order linear differential equations.