Enter coefficients, interval limits, steps, and initial conditions. Compare exact-style and numerical solution paths instantly. Download clean reports and inspect solution behavior visually today.
This calculator solves first-order linear equations in the standard form y' + P(x)y = Q(x) using an integrating-factor path and compares it with RK4 and Euler.
Sample setup for quick testing before entering your own coefficients.
| Case | P(x) | Q(x) | x₀ | y(x₀) | x₁ | Steps | Purpose |
|---|---|---|---|---|---|---|---|
| Example A | 2*x | sin(x) | 0 | 1 | 2 | 40 | Smooth coefficient growth with oscillatory forcing |
| Example B | 1 | x+2 | 0 | 3 | 4 | 60 | Constant damping with linear input |
| Example C | cos(x) | exp(-x) | 0 | 0.5 | 3 | 80 | Variable coefficient with decaying source |
Standard linear ODE:
y' + P(x)y = Q(x)
Integrating factor:
μ(x) = exp(∫P(x)dx)
Solution form:
y(x) = [ y(x₀) + ∫ from x₀ to x of μ(t)Q(t)dt ] / μ(x)
Slope function for numerical checks:
f(x, y) = Q(x) − P(x)y
RK4 update idea:
k₁ = f(xₙ, yₙ), k₂ = f(xₙ+h/2, yₙ+hk₁/2), k₃ = f(xₙ+h/2, yₙ+hk₂/2), k₄ = f(xₙ+h, yₙ+hk₃), then yₙ₊₁ = yₙ + h(k₁+2k₂+2k₃+k₄)/6.
This page evaluates the integrating-factor route numerically across the interval, which is why the result is labeled exact-style instead of symbolic exact.
It handles first-order linear ordinary differential equations written as y' + P(x)y = Q(x). Enter P(x), Q(x), one initial condition, and an interval endpoint.
The exact-style path follows the integrating-factor formula numerically. RK4 is a strong numerical check, while Euler is a simple baseline. Seeing all three helps you judge reliability.
Yes. Supported examples include sin(x), cos(x), tan(x), exp(x), log(x), sqrt(x), abs(x), sinh(x), cosh(x), tanh(x), pi, and e.
Increase the number of steps first. Very large coefficients, steep growth, or long intervals can also make numerical behavior harder to track, especially for Euler.
This version focuses on robust interval solving and comparison. It evaluates the integrating-factor formula numerically, which is practical for many coefficient functions entered directly by users.
Yes. You may use a target x₁ that is smaller than x₀. The solver automatically uses a negative step size and computes the interval in reverse.
It is a multiplier that converts the left side into a product derivative. That transformation makes the linear equation easier to integrate across the interval.
The CSV and PDF exports save the computed table, including x, P(x), Q(x), integrating factor, exact-style solution, RK4, Euler, and the absolute difference column.
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.