Linear 1st Order Differential Equations

$y' + P(x)y = Q(x)$

Linear First Order Differential Equation
Standard Integration » Power Series » 1st Order » Numerical Methods » Differential Equation Calculus

Linear DE Solver

Solve $\frac{dy}{dx} + P(x)y = Q(x)$

Initial Condition (Optional)

Introduction to Linear 1st Order (First-Order) Differential Equations

A linear first-order ordinary differential equation is an equation that can be written in the standard form:

$$ \frac{dy}{dx} + P(x)y = Q(x) $$

Where:

  • $y$ is the dependent variable (a function of $x$).
  • $x$ is the independent variable.
  • $P(x)$ and $Q(x)$ are functions of $x$ only (or constants).

The term "linear" refers to the fact that $y$ and its derivative $\frac{dy}{dx}$ appear only to the first power and are not multiplied together. "First-order" means that the highest derivative present is the first derivative.

These types of equations appear in various applications, including physics (e.g., RC circuits, motion with air resistance), engineering, biology (e.g., population models), and finance.

Method of Solution: Integrating Factor

Linear first-order differential equations of the form $\frac{dy}{dx} + P(x)y = Q(x)$ are typically solved using the integrating factor method. The steps are as follows:

  1. Standard Form: Ensure the equation is in the standard form: $\frac{dy}{dx} + P(x)y = Q(x)$. Identify $P(x)$ and $Q(x)$.
  2. Calculate the Integrating Factor ($I(x)$): The integrating factor is given by: $$ I(x) = e^{\int P(x)dx} $$ Note: When finding $\int P(x)dx$ for the integrating factor, we usually omit the constant of integration $C$, as it would cancel out later.
  3. Key Idea: Multiplying the standard form by $I(x)$ makes the left side the derivative of a product: $$ I(x)\frac{dy}{dx} + I(x)P(x)y = I(x)Q(x) $$ The left side becomes $\frac{d}{dx} [I(x)y]$. So, $$ \frac{d}{dx} [I(x)y] = I(x)Q(x) $$
  4. Integrate Both Sides: Integrating the above relation gives: $$ I(x)y = \int I(x)Q(x)dx + C $$ Here, $C$ is the constant of integration from this final integration.
  5. Solve for $y$: Divide by $I(x)$ to get the general solution: $$ y(x) = \frac{1}{I(x)} \left( \int I(x)Q(x)dx + C \right) $$
  6. Apply Initial Condition (if given): If an initial condition $y(x_0) = y_0$ is provided, substitute $x_0$ and $y_0$ into the general solution to solve for the constant $C$ and find the particular solution.