Opening the book…
One of the strongest reasons to learn Simulink is that it is very useful for solving differential equations. Differential equations describe relationships involving rates of change. In engineering, rates of change appear everywhere: velocity is the rate of change of position, acceleration is the rate of change of velocity, current can depend on changing voltage, and temperature can change over time.
A simple differential equation has the form:
dx/dt = sin(t)
This equation says that the rate of change of x with respect to time is equal to sin(t). To find x, we integrate sin(t) with respect to time. In Simulink, the Integrator block performs this integration.
If you can write an equation in the form derivative = something, then you can often build a Simulink model by feeding that something into an Integrator block. The output of the Integrator is the original variable.
Example: Solving dx/dt = sin(t)
For this model, the input to the Integrator is sin(t), and the output of the Integrator is x(t).
Blocks needed:
- Sine Wave block from Sources
- Integrator block from Continuous or Commonly Used Blocks
- Scope block from Sinks
Build the model in Simulink:
1. Drag a Sine Wave block into the model.
2. Drag an Integrator block into the model.
3. Connect the Sine Wave output to the Integrator input.
4. Connect the Integrator output to a Scope block.
5. Connect the Sine block to the same Scope block.
6. Open the Sine Wave block and set the amplitude to 1 and the frequency to 1.
7. Open the Integrator block and set the initial condition to 0.
8. Change the stop Time to 2*pi.
9. Run the model.

The initial condition tells Simulink the starting value of x. Without an initial condition, a differential equation usually does not have a unique solution.
After running the model, double-click the Scope block to see the result. There should be two curves: one for sin(t) and one for x(t). Add a legend to identify the two curves.
- Open the Scope graph.
- Go to Scope → Settings
- Check the box next to Legend.
After running the model, double click the Scope block to see the result. There will be two curves, one sin(t) and the other x(t). Add a legend to identify the two curves.

The blue curve represents the input signal, sin(t), and the yellow curve represents the integral solution, x(t).

This page titled 11.12: Solving Differential Equations in Simulink was last modified on Tue, 30 Jun 2026 02:11:50 GMT and is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Zara Noroozi.
The book could not be loaded just now.