Skip to content

Linear ODE system

Example
Source DeepXDE example
Problem Forward and Inverse (the Inverse mode is PINNStudio's addition)
Dimension ODE (t)
Regime Time-dependent
Geometry — (t only)
Outputs y1, y2
Settings Default, Tuned

Governing equations

Mathematical form (from the benchmark records):

\[\frac{dy_1}{dt} = y_2, \qquad \frac{dy_2}{dt} = -y_1, \qquad t \in [0, 10]\]

As typed in PINNStudio's Equations page (each expression is a residual, set to zero):

dy1_t - y2
dy2_t + y1

As typed in PINNStudio's Equations page (Inverse mode) (each expression is a residual, set to zero):

dy1_t - y2
dy2_t + w*y1

Domain

  • Time interval: \(t \in [0, 10]\)

Initial conditions

Output Initial value How it is imposed (Settings: Default)
y1 0 loss term
y2 1 loss term

Boundary conditions

No boundary-condition rows: the boundary values are imposed exactly through the network's output transform (see Methods below), or the problem has no boundary terms.

Unknowns and measured data (Inverse)

Trainable parameter Initial value True value
w 2 1

Measured data (Inverse page, measured-data files):

Settings

Forward mode

Settings: Default — DeepXDE's own settings

  • Network: FNN, hidden layers 3 × 50, inputs (t), 2 outputs; activation tanh, initializer Glorot uniform
  • Points: 35 domain, 2 boundary, 100 test
  • Loss weights: 1,1,1,1 (equations, then boundary-condition rows, then initial conditions)
Phase Optimizer Iterations Learning rate Decay
1 Adam 20,000 0.001 none

No separate Tuned preset: the Tuned item is greyed out for this example (its Default settings are PINNStudio's best).

Inverse mode

Settings: Default — DeepXDE's settings with PINNStudio's Inverse-mode changes (see Notes)

  • Network: FNN, hidden layers 3 × 50, inputs (t), 2 outputs; activation tanh, initializer Glorot uniform
  • Points: 35 domain, 2 boundary, 100 test
  • Loss weights: 1,1,1,1 (equations, then boundary-condition rows, then initial conditions)
Phase Optimizer Iterations Learning rate Decay
1 Adam 20,000 0.001 none
2 L-BFGS 15,000 — none
Settings: Tuned

The Training Log reports: Tuned settings: 3× iterations, a larger network, 3× points and an L-BFGS phase together. The change is applied to the example's own settings.

  • Network: FNN, hidden layers 4 × 100, inputs (t), 2 outputs; activation tanh, initializer Glorot uniform
  • Points: 105 domain, 6 boundary, 100 test
  • Loss weights: 1,1,1,1 (equations, then boundary-condition rows, then initial conditions)
Phase Optimizer Iterations Learning rate Decay
1 Adam 60,000 0.001 none
2 L-BFGS 45,000 — none

Results

The configuration selected in PINNStudio's benchmark study, run on one RTX 4090. Forward: relative L₂ error of each output at the last reference time. Inverse: each parameter's relative error and, per seed, the largest of them (worst parameter error).

Forward problem

Settings: Default — the example's own settings (not in the tuning sweep); the example has no separate Tuned preset for this mode. Values: one run, seed 2026.

Output Relative L₂
y1 3.6 × 10⁻³
y2 3.1 × 10⁻³
Forward result: PINN and reference along lines, y1
Forward, Default settings: PINN and reference along lines, y1.
Other outputs (1 figure)

Forward result: PINN and reference along lines, y2
Forward, Default settings: PINN and reference along lines, y2.

Inverse problem

Settings: Tuned — all of the changes together. Values: one run, seed 2026.

Parameter True value Recovered Relative error
w 1 0.999912 0.0088 %

Worst parameter error: 0.0088 %.

Inverse result: PINN and reference along lines, y1
Inverse, Tuned settings: PINN and reference along lines, y1.
Inverse result: parameter convergence
Inverse, Tuned settings: parameter convergence.
Other outputs (1 figure)

Inverse result: PINN and reference along lines, y2
Inverse, Tuned settings: PINN and reference along lines, y2.

Full benchmark record: every setting tried, the per-seed values and all figures are in the benchmark records on GitHub.

Loading it in PINNStudio

  • Forward: toolbar Examples: › Forward › under the ── ODE ── heading, Linear ODE system › Default, then Solve.
  • Inverse: toolbar Examples: › Inverse › under the ── ODE ── heading, Linear ODE system › Default or Tuned, then Solve.

Loading an example fills in every setting; anything you change before Solve is listed in the Training Log. Your save folder, GPU, random-seed and plot-style settings are kept.

Reference solution

  • Exact solution, Error Analysis › reference from formula: y1 = sin(t), y2 = cos(t)

Notes

  • Inverse mode (PINNStudio's addition): the coefficient w in y2' = -w y1 (1 in the forward equations; initial guess 2) is learned from y1 and y2 at 40 times (reference_data/deepxde/ode_system_inverse). An L-BFGS phase follows Adam.

Definition and records

How the benchmark values were measured and checked: Reproducibility.

← Back to the example gallery