- Algebra
- Arithmetic
- Whole Numbers
- Numbers
- Types of Numbers
- Odd and Even Numbers
- Prime & Composite Numbers
- Sieve of Eratosthenes
- Number Properties
- Commutative Property
- Associative Property
- Identity Property
- Distributive Property
- Order of Operations
- Rounding Numbers
- Absolute Value
- Number Sequences
- Factors & Multiples
- Prime Factorization
- Greatest Common Factor
- Least Common Multiple
- Squares & Perfect Squares
- Square Roots
- Squares & Square Roots
- Simplifying Square Roots
- Simplifying Radicals
- Radicals that have Fractions
- Multiplying Radicals
- Integers
- Fractions
- Introducing Fractions
- Converting Fractions
- Comparing Fractions
- Ordering Fractions
- Equivalent Fractions
- Reducing Fractions
- Adding Fractions
- Subtracting Fractions
- Multiplying Fractions
- Reciprocals
- Dividing Fractions
- Adding Mixed Numbers
- Subtracting Mixed Numbers
- Multiplying Mixed Numbers
- Dividing Mixed Numbers
- Complex Fractions
- Fractions to Decimals
- Decimals
- Exponents
- Percent
- Scientific Notation
- Proportions
- Equality
- Properties of equality
- Addition property of equality
- Transitive property of equality
- Subtraction property of equality
- Multiplication property of equality
- Division property of equality
- Symmetric property of equality
- Reflexive property of equality
- Substitution property of equality
- Distributive property of equality
- Commercial Math
- Calculus
- Differential Calculus
- Limits calculus
- Mean value theorem
- L’Hôpital’s rule
- Newton’s method
- Derivative calculus
- Power rule
- Sum rule
- Difference rule
- Product rule
- Quotient rule
- Chain rule
- Derivative rules
- Trigonometric derivatives
- Inverse trig derivatives
- Trigonometric substitution
- Derivative of arctan
- Derivative of secx
- Derivative of csc
- Derivative of cotx
- Exponential derivative
- Derivative of ln
- Implicit differentiation
- Critical numbers
- Derivative test
- Concavity calculus
- Related rates
- Curve sketching
- Asymptote
- Hyperbolic functions
- Absolute maximum
- Absolute minimum
- Integral Calculus
- Fundamental theorem of calculus
- Approximating integrals
- Riemann sum
- Integral properties
- Antiderivative
- Integral calculus
- Improper integrals
- Integration by parts
- Partial fractions
- Area under the curve
- Area between two curves
- Center of mass
- Work calculus
- Integrating exponential functions
- Integration of hyperbolic functions
- Integrals of inverse trig functions
- Disk method
- Washer method
- Shell method
- Sequences, Series & Tests
- Parametric Curves & Polar Coordinates
- Multivariable Calculus
- 3d coordinate system
- Vector calculus
- Vectors equation of a line
- Equation of a plane
- Intersection of line and plane
- Quadric surfaces
- Spherical coordinates
- Cylindrical coordinates
- Vector function
- Derivatives of vectors
- Length of a vector
- Partial derivatives
- Tangent plane
- Directional derivative
- Lagrange multipliers
- Double integrals
- Iterated integral
- Double integrals in polar coordinates
- Triple integral
- Change of variables in multiple integrals
- Vector fields
- Line integral
- Fundamental theorem for line integrals
- Green’s theorem
- Curl vector field
- Surface integral
- Divergence of a vector field
- Differential equations
- Exact equations
- Integrating factor
- First order linear differential equation
- Second order homogeneous differential equation
- Non homogeneous differential equation
- Homogeneous differential equation
- Characteristic equations
- Laplace transform
- Inverse laplace transform
- Dirac delta function
- Differential Calculus
- Matrices
- Pre-Calculus
- Lines & Planes
- Functions
- Domain of a function
- Transformation Of Graph
- Polynomials
- Graphs of rational functions
- Limits of a function
- Complex Numbers
- Exponential Function
- Logarithmic Function
- Sequences
- Conic Sections
- Series
- Mathematical induction
- Probability
- Advanced Trigonometry
- Vectors
- Polar coordinates
- Probability
- Geometry
- Angles
- Triangles
- Types of Triangles
- Special Right Triangles
- 3 4 5 Triangle
- 45 45 90 Triangle
- 30 60 90 Triangle
- Area of Triangle
- Pythagorean Theorem
- Pythagorean Triples
- Congruent Triangles
- Hypotenuse Leg (HL)
- Similar Triangles
- Triangle Inequality
- Triangle Sum Theorem
- Exterior Angle Theorem
- Angles of a Triangle
- Law of Sines or Sine Rule
- Law of Cosines or Cosine Rule
- Polygons
- Circles
- Circle Theorems
- Solid Geometry
- Volume of Cubes
- Volume of Rectangular Prisms
- Volume of Prisms
- Volume of Cylinders
- Volume of Spheres
- Volume of Cones
- Volume of Pyramids
- Volume of Solids
- Surface Area of a Cube
- Surface Area of a Cuboid
- Surface Area of a Prism
- Surface Area of a Cylinder
- Surface Area of a Cone
- Surface Area of a Sphere
- Surface Area of a Pyramid
- Geometric Nets
- Surface Area of Solids
- Coordinate Geometry and Graphs
- Coordinate Geometry
- Coordinate Plane
- Slope of a Line
- Equation of a Line
- Forms of Linear Equations
- Slopes of Parallel and Perpendicular Lines
- Graphing Linear Equations
- Midpoint Formula
- Distance Formula
- Graphing Inequalities
- Linear Programming
- Graphing Quadratic Functions
- Graphing Cubic Functions
- Graphing Exponential Functions
- Graphing Reciprocal Functions
- Geometric Constructions
- Geometric Construction
- Construct a Line Segment
- Construct Perpendicular Bisector
- Construct a Perpendicular Line
- Construct Parallel Lines
- Construct a 60° Angle
- Construct an Angle Bisector
- Construct a 30° Angle
- Construct a 45° Angle
- Construct a Triangle
- Construct a Parallelogram
- Construct a Square
- Construct a Rectangle
- Locus of a Moving Point
- Geometric Transformations
- Sets & Set Theory
- Statistics
- Collecting and Summarizing Data
- Common Ways to Describe Data
- Different Ways to Represent Data
- Frequency Tables
- Cumulative Frequency
- Advance Statistics
- Sample mean
- Population mean
- Sample variance
- Standard deviation
- Random variable
- Probability density function
- Binomial distribution
- Expected value
- Poisson distribution
- Normal distribution
- Bernoulli distribution
- Z-score
- Bayes theorem
- Normal probability plot
- Chi square
- Anova test
- Central limit theorem
- Sampling distribution
- Logistic equation
- Chebyshev’s theorem
- Difference
- Correlation Coefficient
- Tautology
- Relative Frequency
- Frequency Distribution
- Dot Plot
- Сonditional Statement
- Converse Statement
- Law of Syllogism
- Counterexample
- Least Squares
- Law of Detachment
- Scatter Plot
- Linear Graph
- Arithmetic Mean
- Measures of Central Tendency
- Discrete Data
- Weighted Average
- Summary Statistics
- Interquartile Range
- Categorical Data
- Trigonometry
- Vectors
- Multiplication Charts
- Time Table
- 2 times table
- 3 times table
- 4 times table
- 5 times table
- 6 times table
- 7 times table
- 8 times table
- 9 times table
- 10 times table
- 11 times table
- 12 times table
- 13 times table
- 14 times table
- 15 times table
- 16 times table
- 17 times table
- 18 times table
- 19 times table
- 20 times table
- 21 times table
- 22 times table
- 23 times table
- 24 times table
- Time Table
Non Homogeneous Differential Equation – Definition and Examples
Learning about non-homogeneous differential equations is fundamental, since there are instances when we’re given complex equations with functions on both sides of the equation. Laws of motion, for example, rely on non-homogeneous differential equations, so it is important that we learn how to solve these types of equations.
Non-homogenous differential equations contain functions on their right-hand side of the equations. We can find their solutions by writing down the general solution of the associated homogeneous differential equation and the particular solution of the non-homogeneous term.
Solving non-homogeneous differential equations will still require our knowledge on solving second order homogeneous differential equations, so keep your notes handy on characteristic and second order homogeneous equations. This article covers the fundamentals needed to identify non-homogeneous differential equations and two important methods that will help you find their solutions.
What Is a Non Homogeneous Differential Equation?
Non-homogeneous differential equations are simply differential equations that do not satisfy the conditions for homogeneous equations. In the past, we’ve learned that homogeneous equations are equations that have zero on the right-hand side of the equation.
This means that non-homogenous differential equations are differential equations that have a function on the right-hand side of their equation.
Here are some examples of homogeneous and non-homogenous differential equations. Through these examples, we’ll learn how to identify differential equations based on their form.
Homogeneous Differential Equations | Non-Homogenous Differential Equations |
\begin{aligned}y^{\prime \prime} + y^{\prime} – 2y = 0\end{aligned} | \begin{aligned}y^{\prime \prime} + y^{\prime} – 2y = 4x\end{aligned} |
\begin{aligned}y^{\prime \prime} -3y^{\prime} + y = 0\end{aligned} | \begin{aligned}y^{\prime \prime} -3y^{\prime} + y = -6 – 2x + 3x^2\end{aligned} |
\begin{aligned}y^{\prime \prime \prime} +4y^{\prime\prime} + 4y^{\prime} + y = 0\end{aligned} | \begin{aligned}y^{\prime \prime \prime} +4y^{\prime\prime} + 4y^{\prime} + y = 2e^x\end{aligned} |
From these three equations alone, we can clearly see that the right-hand side of the equations will determine whether the differential equations are homogeneous or non-homogeneous. We call the equations on the left column the associated homogeneous equations since they share identical expressions with their non-homogeneous counterparts.
Since we’ve been working on first order and second order non-homogeneous linear differential equations, let us show you their general forms:
\begin{aligned}\textbf{First Order} &: y^{\prime} + P(x)y = f(x)\\\textbf{Second Order} &: y^{\prime} + P(x)y^{\prime} + Q(x)y = g(x)\\ \end{aligned}
In the next section, we’ll show you how to solve these types of equations by applying old techniques and even new methods!
How To Solve Non Homogeneous Differential Equations?
We can solve non-homogeneous linear differential equations by finding the general solution of the associated homogeneous differential equation, $y_h$, and the particular solution of the non-homogeneous equation, $y_p$.
Let’s work on a first order non-homogeneous differential equation to start this section lightly.
\begin{aligned}y^{\prime} + P(x)y = f(x)\end{aligned}
In the past, we’ve learned how to deal with these types of equations. We’ve shown you how to use integrating factors to write the general equation for a first order non-homogeneous differential equation. This process will eventually lead to a general solution shown below.
\begin{aligned}y &= h(x) + p(x) \end{aligned}
For this solution, $g(x)$ represents the general solution, while $h(x)$ represents the particular solution of the first order non-homogeneous differential equation. Since we’ve set a special article for that, our discussion will focus on second order non-homogeneous differential equations and those with higher order as well.
SOLUTION FOR NON HOMOGENEOUS DIFFERENTIAL EQUATIONS Suppose that we have a second order non-homogeneous linear differential equation shown below. \begin{aligned}y^{\prime \prime} +ay^{\prime} + by &= g(x)\end{aligned} For this equation, $a$ and $b$ are constants. When this happens, the nonhomogeneous differential equation with a general solution as shown below. \begin{aligned}\boldsymbol{y} &= \boldsymbol{y_h + y_p}\\\\y_h&: \text{General Solution}\\y_p&: \text{Particular Solution}\end{aligned} This can be extended with $n$th-order non-homogeneous linear differential equation. The general solution of this linear differential equation is as shown below. \begin{aligned}c_1y_1 + c_2\end{aligned} |
In previous articles, we have also learned how to find the general solutions for homogeneous differential equations. We’ll apply the same methods and techniques when finding the general solution for our associated homogeneous equation. This means that we’ll be focusing on techniques to find the particular solution for these non-homogeneous equations.
How To Find the Particular Solution of a Non Homogeneous Differential Equation
The two most common methods when finding the particular solution of a non-homogeneous differential equation are: 1) the method of undetermined coefficients and 2) the method of variation of parameters.
Method of Undetermined Coefficients
Let’s first break down the steps for the method of undetermined coefficients and know when it’s best to use this technique. The undetermined coefficient method works best when the right-hand side of our non-homogeneous differential equation is a function that can be written as sum or product of the following functions: $x^n$, $e^{ax}$,$\sin \beta x$, or $\cos \beta x$.
\begin{aligned}y^{\prime \prime} +ay^{\prime} + by &= g(x)\end{aligned}
Once we identify the form of the $g(x)$, use a strategic guess for the particular solution, $y_p$. Let us show you some common examples for a smart guess given an expression for $g(x)$:
Example of $\boldsymbol{g(x)}$ | Particular Solution ($\boldsymbol{y_p}$) |
\begin{aligned}g(x) = 2x^2\end{aligned} | \begin{aligned}y_p = ax^2 + bx + c\end{aligned} |
\begin{aligned}g(x) = 3xe^x\end{aligned} | \begin{aligned}y_p = axe^x + bex^x c\end{aligned} |
\begin{aligned}g(x) = x + 4\cos 3x\end{aligned} | \begin{aligned}y_p = (ax + b) + c \sin 3x + d + \cos 3x\end{aligned} |
These three equations should give you an idea of how we come up with particular solutions we can use to complete the general solution for our second order homogeneous differential equation. Find the first and second derivatives of $y_p$ and use them inside the equation then solve for the values of the constants.
To understand how this method works, let’s try to solve the non-homogeneous differential equations, $y^{\prime \prime} + 6y^{\prime} + 5y = 4x$. First, let’s find $y_h$, the general solution of the equation’s associated homogeneous equation.
\begin{aligned}y^{\prime \prime} + 6y^{\prime} + 5y = 0\end{aligned}
This means that the characteristic equation (or auxiliary equation) is a quadratic equation, $r^2 + 6r + 5= 0$. The roots of this equation are $r_1 = -1$ and $r_2 = -5$, so the general form of $y_h$ is equal to the equation shown below.
\begin{aligned}y_h = C_1 e^{-x} + C_2 e^{-5x} \end{aligned}
Since our equation’s right-hand side is equal to $g(x) = 4x$, the general form of our particular solution would be equivalent to $y_p = ax + b$. This means that $y_p^{\prime } = a$ and $y_p^{\prime } = 0$. We’ve learned in the past that the particular solution should be a solution to the differential equation, so substitute these expressions and solve for $a$ and $b$.
\begin{aligned}y^{\prime \prime}_p + 6y^{\prime}_p + 5y_p &= 4x\\0 + 6a + 5(ax +b) &= 4x\\5ax + (6a +b) &= 4x\\\\5a= 4, 6a &+b =0\\a = \dfrac{4}{5} ,b =& -\dfrac{24}{5}\end{aligned}
This means that $y_p = \dfrac{4}{5}x – \dfrac{24}{5}$. Now that we have both components, $y_h$ and $y_p$, let’s complete the general solution of our second order non-homogeneous differential equation is:
\begin{aligned}y_h&= C_1 e^{-x} + C_2 e^{-5x} \\y_p&=\dfrac{4}{5}x – \dfrac{24}{5}\\\\ \boldsymbol{y(x)} &\boldsymbol{=} \boldsymbol{C_1 e^{-x} + C_2 e^{-5x}+\dfrac{4}{5}x – \dfrac{24}{5}} \end{aligned}
We’ve now shown you how the first method works, so let’s move on to our second technique: the method of variation of parameters.
Method of Variation Parameters
For more complex expressions for $g(x)$, it may be difficult to come up with a particular solution that we can easily use. When that happens, it is much better for us to apply the method of variation parameters, where we assume that the general and particular solution components have the same forms. Below are the guidelines to remember when using this method:
- Find the expression for $y_h = C_1y_1 + C_2y_2$, using previous techniques.
- Write down the particular solution, $y_p = ay_1 + by_2$, based on the form of $y_h$.
- Set up the system of equations to solve for $a^{\prime}$ and $b^{\prime}$.
\begin{aligned}a^{\prime}y_1 + b^{\prime}y_2 &= 0\\a^{\prime}y_1^{\prime} + b^{\prime}y_2^{\prime} &= g(x) \end{aligned}
- Integrate the resulting expressions for $a^{\prime}$ and $b^{\prime}$ to find $a$ and $b$.
- Write down the general solution for the non-homogeneous differential equation: $y = y_h + y_p$.
These steps are straightforward but can be complex depending on the resulting expressions. Just apply the appropriate techniques learned in the past to find the solutions using variation of parameters. Our first example below shows how we can use this method to solve more interesting non-homogeneous differential equations.
Example 1
Find the general solution of the non-homogeneous differential equation, $y^{\prime\prime} +y = \tan x$.
Solution
Since we don’t have a guiding rule for $g(x) = \tan x$, we can’t use the method of undetermined coefficients. We can instead use the second method beginning with finding the general solution for the associated homogeneous equations. This means that the characteristic equation is equal to $r^2 + 1= 0 \rightarrow r = \pm i$, so the homogeneous solution is equal to
\begin{aligned}y_h = C_1\cos x + C_2 \sin x\end{aligned}
Using the form of $y_h$, let’s use the particular solution, $y_p = a\cos x +b\sin x$. Write down the system of linear equations:
\begin{aligned}a^{\prime}\cos x+ b^{\prime}\sin x &= 0\\-a^{\prime}\sin x+ b^{\prime}\cos x &= \tan x \end{aligned}
Apply the elimination method by multiplying appropriate factors then find $a$.
\begin{aligned}{\color{blue}\sin x}(a^{\prime}\cos x+ b^{\prime}\sin x) &= {\color{blue}\sin x}(0)\\ {\color{blue}\cos x}(-a^{\prime}\sin x+ b^{\prime}\cos x ) &= {\color{blue}\cos x}(\tan x)\\\\a^{\prime}\sin x\cos x + b^{\prime}\sin^2x&= 0\\-a^{\prime}\sin x\cos x + b^{\prime}\cos^2x&= \sin x \end{aligned}
Simplify the equation further and you should come up with $b^{\prime} = \cos x – \sec x $. This eventually leads to $a^{\prime} = -\dfrac{\sin^2 x}{\cos x} = \cos x – \sec x$. Integrate the expressions to find the constants for $y_p$.
\begin{aligned}\boldsymbol{a^{\prime} = \cos x – \sec x }\end{aligned} | \begin{aligned}\boldsymbol{\sin x}\end{aligned} |
\begin{aligned} a^{\prime} &= \int (\cos x – \sec x ) \phantom{x}dx\\&= \sin x – \ln |\sec x +\tan x|\end{aligned} | \begin{aligned} b^{\prime} &= \int \sin x \phantom{x}dx\\&= -\cos x\end{aligned} |
\begin{aligned} y_p &= a\cos x +b\sin x\\&= \cos x(\sin x – \ln |\sec x +\tan x|) + \sin x(-\cos x)\\&= -\cos x \ln |\sec x +\tan x|\end{aligned} |
Combining the expressions for $y_h$ and $y_p$, we have $y = y_h + y_p = C_1\cos x + C_2 \sin x -\cos x \ln |\sec x +\tan x|$.
Example 2
Find the general solution of the non-homogeneous differential equation, $y^{\prime\prime\prime} + 6y^{\prime\prime} + 12y^{\prime} +8y = 4x$.
Solution
Our right-hand side this time is $g(x) = 4x$, so we can use the first method: undetermined coefficients. We begin by finding the general solution for the associated homogeneous equations, $ y^{\prime\prime\prime} + 6y^{\prime\prime} + 12y^{\prime} +8y = 0$. This type of third-order differential equation will have a general solution of $y_h=C_1e^{r_1x}+ C_2xe^{r_2x}+ C_3x^2e^{r_3x}$, where $\{r_1, r_2, r_3\}$ are roots of the characteristic equation.
\begin{aligned} y_h= C_1e^{-2x}+ C_2xe^{-2x}+ C_3x^2e^{-2x}\end{aligned}
Since the right-hand side of the equation is equal to $4x$, the particular solution, $y_p$ will have a general form of $ax + b$. This means that $y_p^{\prime} =a$ and $y_p^{\prime \prime} =0$.
\begin{aligned} y^{\prime\prime\prime} + 6y^{\prime\prime} + 12y^{\prime} + 8y &= 4x\\0 + 6(0) + 12a + 8(ax +b) &= 4x\\8ax + (12a +8b) &= 4x\\\\8a= 4 &\rightarrow a = \dfrac{1}{2}\\6+8b =0 &\rightarrow b=-\dfrac{3}{4}\end{aligned}
This means that we have the particular solution, $y_p = \dfrac{1}{2}x – \dfrac{3}{4}$. Combine the two components of our equation to find the general equation of the third order non-homogeneous differential equation.
\begin{aligned}y&= y_h + y_p\\&= C_1e^{-2x}+ C_2xe^{-2x}+ C_3x^2e^{-2x} +\dfrac{1}{2}x – \dfrac{3}{4}\end{aligned}
Practice Questions
1. Find the general solution of the non-homogeneous differential equation, $y^{\prime\prime} +y^{\prime}-6 = x^3$.
2. Find the general solution of the non-homogeneous differential equation, $y^{\prime\prime} -2y^{\prime} = \dfrac{e^x}{4x}$.
3. Find the general solution of the non-homogeneous differential equation, $ y^{\prime\prime\prime}+3y^{\prime\prime}+3y^{\prime} +y = 2x $.
Answer Key
1. $ y=C_1+C_2e^{-x}+ \dfrac{x^4}{4} -x^3+3x^2$
2.$ y= C_1e^x+C_2xe^x+ \dfrac{-e^xx+e^xx\ln \left(x\right)}{4}$
3.$ y=C_1e^{-x}+C_2xe^{-x}+C_3x^2e^{-x}+2x-6$