Variation of Parameters Solver Form
Example Data Table
The sample below uses the equation y'' - y = x with y₁(x)=eˣ, y₂(x)=e⁻ˣ, g(x)=x, x₀=0, C₁=1, and C₂=0. For this case, the particular solution is yₚ(x)=-x.
| x | y₁(x)=eˣ | y₂(x)=e⁻ˣ | g(x) | W(x) | yp(x) | y(x)=eˣ-x |
|---|---|---|---|---|---|---|
| 0 | 1.000000 | 1.000000 | 0.000000 | -2.000000 | 0.000000 | 1.000000 |
| 1 | 2.718282 | 0.367879 | 1.000000 | -2.000000 | -1.000000 | 1.718282 |
| 2 | 7.389056 | 0.135335 | 2.000000 | -2.000000 | -2.000000 | 5.389056 |
| 3 | 20.085537 | 0.049787 | 3.000000 | -2.000000 | -3.000000 | 17.085537 |
Formula Used
Normalized differential equation
y'' + p(x)y' + q(x)y = g(x)
Wronskian
W(x) = y₁(x)y₂'(x) - y₁'(x)y₂(x)
Variation of parameters derivatives
u₁'(x) = -y₂(x)g(x) / W(x)
u₂'(x) = y₁(x)g(x) / W(x)
Integral terms
u₁(x) = ∫u₁'(x) dx
u₂(x) = ∫u₂'(x) dx
Particular and total solutions
yₚ(x) = u₁(x)y₁(x) + u₂(x)y₂(x)
y(x) = C₁y₁(x) + C₂y₂(x) + yₚ(x)
This page computes derivatives numerically and evaluates the integrals with the trapezoidal rule. It is ideal for study, checking, and visualization when closed-form symbolic integration is inconvenient.
How to Use This Calculator
- Write the equation in normalized form so the coefficient of y'' is 1.
- Enter two valid homogeneous solutions, y₁(x) and y₂(x).
- Enter the forcing term g(x) after normalization.
- Choose the interval, step size, and anchor point x₀ for the integrals.
- Enter C₁ and C₂ if you want the total solution, not only the particular one.
- Press the calculate button to generate the summary, data table, and graph.
- Use the CSV button to export numeric data for spreadsheets.
- Use the PDF button to capture the result section for sharing or documentation.
FAQs
1) What does this solver calculate?
It numerically builds a particular solution and then combines it with your homogeneous solutions. It also shows the Wronskian, integration terms, graph, and exportable table.
2) Do I need to enter p(x) and q(x)?
No. This calculator only needs two valid homogeneous solutions and the normalized forcing term. The variation of parameters formula works directly from those entries.
3) Why must the equation be normalized?
Variation of parameters is commonly written for y'' + p(x)y' + q(x)y = g(x). If your equation starts with a(x)y'', divide the whole equation by a(x).
4) What happens if the Wronskian is near zero?
A near-zero Wronskian suggests your two basis functions may fail linear independence on the chosen interval. The solver warns you because the formula becomes unstable there.
5) Is the result exact or approximate?
The method here is numerical. Derivatives are approximated and integrals use the trapezoidal rule, so the result is a strong approximation rather than a symbolic closed form.
6) What kinds of functions can I enter?
You can enter expressions supported by math.js, such as exp(x), sin(x), cos(x), x^2, log(x), sqrt(x), and combinations of those functions.
7) What is the purpose of x₀?
The anchor point x₀ is the lower limit used for both integral terms. Changing it shifts u₁(x) and u₂(x), which changes the particular solution representation.
8) When should I use CSV and PDF exports?
Use CSV when you want to analyze numbers in spreadsheet software. Use PDF when you want a visual report of the result summary, graph, and table.