Cauchy Problem Solver Calculator

Model an initial condition and inspect solution behavior. View exact formulas, RK4 approximations, and errors. Generate clean tables, exports, and graphs for better insight.

Calculator

Enter the Cauchy problem data

This solver handles the first-order linear form y′ = ax + by + c with the initial condition y(x₀) = y₀. It returns the exact answer, an RK4 approximation, error metrics, a graph, and a full step table.

Coefficient of x in the differential equation.
Coefficient of y in the differential equation.
Constant forcing term.
Starting point of the initial condition.
Known value of the solution at x₀.
Point where the solution is evaluated.
Used for the RK4 numerical march and table density.
Example data table

Sample input set

Field Example Value Meaning
a 1 x coefficient in y′ = ax + by + c
b 1 y coefficient in y′ = ax + by + c
c 0 Constant forcing term
x₀ 0 Initial x value
y₀ 1 Initial solution value
Target x 1 Evaluation point
Step size h 0.25 Numerical step for RK4
Formula used

Mathematical method

Problem model

y′ = ax + by + c, y(x₀) = y₀

Exact linear solution when b ≠ 0

y(x) = [y₀ + (a/b)x₀ + (bc + a)/b²]e^(b(x − x₀)) − (a/b)x − (bc + a)/b²

Exact solution when b = 0

y(x) = y₀ + (a/2)(x² − x₀²) + c(x − x₀)

Runge–Kutta fourth-order update

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₃)

yₙ₊₁ = yₙ + (h/6)(k₁ + 2k₂ + 2k₃ + k₄)

Error metrics

|Error| = |y_exact − y_RK4|

MAE = average of absolute errors

RMSE = sqrt(average of squared errors)

How to use this calculator

Usage steps

  1. Enter the coefficients a, b, and c for the linear differential equation.
  2. Provide the initial condition by setting x₀ and y₀.
  3. Enter the target point x where you want the solution value.
  4. Choose a positive step size h for the RK4 approximation and the table density.
  5. Press Solve Cauchy Problem to generate the exact answer, RK4 estimate, graph, and data table.
  6. Use the CSV or PDF buttons to export the computed solution path.
FAQs

Frequently asked questions

1) What does this calculator solve?

It solves first-order linear Cauchy problems of the form y′ = ax + by + c with an initial condition y(x₀) = y₀. It reports both exact and RK4 numerical results.

2) Why are there two solution values?

The exact value comes from the closed-form linear solution. The RK4 value comes from numerical stepping. Comparing them helps you judge the numerical accuracy of your chosen step size.

3) What is RK4?

RK4 is a fourth-order Runge–Kutta method. It samples the slope four times per step and combines them to produce a much more accurate update than simple Euler stepping.

4) How should I choose the step size h?

Start with a moderate positive step, then reduce it if the RK4 and exact answers differ more than you want. Smaller steps usually improve accuracy but increase table length.

5) What happens if b equals zero?

The problem becomes y′ = ax + c. The exact solution simplifies to a direct polynomial expression, and the calculator automatically switches to that special-case formula.

6) Can this page solve nonlinear Cauchy problems?

No. This implementation is intentionally scoped to the linear family y′ = ax + by + c. Nonlinear Cauchy problems need a different symbolic or numerical framework.

7) Why does the error vary along the interval?

Numerical error accumulates over marching steps. The size and direction of that accumulation depend on the step size, the growth or decay term b, and the forcing structure.

8) Do the inputs need specific units?

Any consistent unit system works. Just keep x, y, and the coefficients aligned so the differential equation is dimensionally meaningful from start to finish.

Related Calculators

divergence theorem calculatorhessian matrix calculatorpotential function solverstream function calculatortransport equation solveradvection equation solvernumerical solution finderfirst order pde solvervibration equation solvercentral difference 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.