Non Homogeneous Differential Equation Solver Calculator

Build solutions for linear forcing models and conditions. See roots, constants, tables, and plotted behaviour. Use one page, flexible inputs, exports, and readable formulas.

Calculator

This solver handles the form y'' + ay' + by = f(x) with constant coefficients and several forcing models.

Example data table

Example Equation form Forcing choice Initial values Range
1 y'' + 3y' + 2y = e^x Exponential y(0) = 0, y'(0) = 1 0 to 5
2 y'' + y = 4cos(2x) + sin(2x) Sine and cosine y(0) = 1, y'(0) = 0 0 to 8
3 y'' - 2y' + y = x^2 - 3x + 1 Quadratic polynomial y(0) = 2, y'(0) = -1 -2 to 4

Formula used

The solver uses the standard linear model y'' + ay' + by = f(x). The complementary part comes from the characteristic equation r² + ar + b = 0. Its roots decide whether the homogeneous solution contains two exponentials, one repeated exponential term, or damped oscillation terms.

The particular part is built with undetermined coefficients. Polynomial forcing uses shifted powers of x. Exponential forcing uses e^(kx). Trigonometric forcing uses sine and cosine terms. A resonance shift multiplies the trial by x whenever the forcing duplicates a complementary term.

Initial conditions are applied after the particular part is found. The calculator subtracts yp(0) and yp'(0) from the given initial values. It then solves for the homogeneous constants and combines both parts into one final function.

How to use this calculator

  1. Enter the coefficients a and b.
  2. Select the forcing type that matches f(x).
  3. Fill only the parameters tied to that forcing type.
  4. Enter y(0) and y'(0).
  5. Set the x-range and sample count.
  6. Submit the form.
  7. Read the homogeneous part, particular part, and full solution.
  8. Review the table, graph, and export files when needed.

About this non homogeneous differential equation solver

Why this model matters

Non homogeneous differential equations appear in many areas of mathematics and applied work. They describe systems driven by outside input. The forcing term may represent load, signal, heat, current, demand, or another source. A good solver must separate the natural response from the driven response.

What the calculator solves

This page solves second order linear equations with constant coefficients. The equation follows the form y'' + ay' + by = f(x). That structure covers a wide set of teaching examples. It also covers many engineering style exercises and exam problems. The tool supports polynomial, exponential, sinusoidal, and mixed forcing expressions.

How the method works

The solution has two parts. The complementary solution handles the homogeneous equation. It depends only on the characteristic roots. The particular solution handles the forcing term. The calculator builds a trial expression that matches the forcing type. It then shifts the trial when resonance occurs. This step is important. Without the shift, the trial would duplicate part of the complementary solution.

How initial values are applied

After finding the particular part, the calculator evaluates it and its first derivative at zero. Those values are removed from the given initial conditions. The remaining values determine the constants in the homogeneous part. This keeps the final function consistent with both the differential equation and the starting conditions.

Why the graph and exports help

The table and graph make behaviour easier to inspect. You can see growth, decay, oscillation, or resonance effects across the chosen interval. The CSV file supports later analysis in a sheet. The PDF file supports reporting, revision, or sharing. The example data table also gives a quick starting point for practice.

FAQs

1. What equation form does this page solve?

It solves second order linear equations with constant coefficients. The supported form is y'' + ay' + by = f(x). The forcing term can be polynomial, exponential, sinusoidal, or exponential sinusoidal.

2. What is a non homogeneous equation?

It is a differential equation with a nonzero forcing term on the right side. That extra term drives the system. The solution therefore includes a natural part and a forced part.

3. Why does the trial sometimes include an extra x factor?

That shift handles resonance. If the trial duplicates a term already present in the complementary solution, multiplication by x makes the particular trial independent and solvable.

4. Can this page solve variable coefficient equations?

No. This version is designed for constant coefficient models only. Variable coefficient equations usually need different analytic methods or a numerical solver.

5. Why are initial values entered at zero?

The current setup applies y(0) and y'(0). That keeps the algebra direct and clear. It also matches many textbook exercises and classroom examples.

6. What does the residual value mean?

The residual checks how closely the computed particular part reproduces the forcing term after substitution. Smaller values indicate a stronger numerical fit for the chosen basis.

7. What do the CSV and PDF files contain?

They contain sampled x values, forcing values, and solution values. The PDF also includes equation details and the main symbolic outputs shown on the page.

8. Is the graph enough to verify the full solution?

The graph is useful for pattern checking, but it is not the only test. You should also inspect the displayed expressions, constants, and residual information.

Related Calculators

numerical ode solverhigher order ode solvervariable expansion calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.