# Differential Equation Systems II- DAEs

#### DAE – The Robertson Problem

Now the differential algebraic equation system of the Robertson Problem will be solved. The full problem is described as follows:

Equation System Robertson problem $\frac{dx}{dt} = -a\cdot x + b \cdot y \cdot z$ $\frac{dy}{dt} = a \cdot x - b \cdot y \cdot z - c\cdot (y)^{2}$ $1=x+y+z$

Notation Diff Eqs

Base Names:

Name Description
a parameter a
b parameter b
c parameter c
t differential variable t
x value x
y value y
z value z

Evaluation

• Design values $a = 0.04$ $b = 1e4$ $c = 3e7$
• Differential variable and initial values for the state variables $t$ in  [1e-7, 1e7] $x = 1.0$ $y = 0.0$ $z = 1e-3$

Notation, equations, and equation system

• Use the same notation as in the Van der Pol example. Only add the missing variables.
• Create the equations and the equation system. Please try to type the equations yourself. If you have problems in entering the code, you may use the following expressions:

For Equation one:

\diff{x}{t}= -a\cdot x + b \cdot y \cdot z

For Equation two:

\diff{y}{t}= a\cdot x – b\cdot y\cdot z – c\cdot (y)^{2}

For Equation three:

1=x+y+z

Evaluation

• Load the equation system into the Evaluation Editor and select the tab Variable Specification.
• Declare a, b, and c as a desgin variables by moving them to the table named Design Variables (to do so, select them in the table State Variables and press [>>]).
• Declare x, y, and z as a state variables by moving them to the table named State Variables (to do so, select them in the table Design Variables and press [<<]).
• Specify the values for the design variables and the state variables in the corresponding table cells.
• Specify 1e-7 as the start value and 1e7 as the end value of the differential variable t in the corresponding fields at the right hand side of the user interface.
• Go to the tab named Evaluation and make sure that the language specificator C++ BzzMath DAE Obj is activated in predefined Language Specification in the dropdown list. Press [Generate Code] and then [Evaluate] to solve the equation system on the modeling server.
• Select the tab Results and in the now visible section select the tab DE Plot Results and tick the box for the variable x in the column Plot of the variables table.
• On the lower right hand side of the user interface, below X-Axis Scale select Logarithmic.
• Activate the graph of the variable z by ticking its box in the variables table.
• HINT: If a selected graph does not show after ticking the corresponding box, unselect it and then select it again.
• Activate the graph of the variable y. The values of y are too small to visualize changes in the same graph with x and z without any adjustments. To make the changes of y over t visible in the graph, specify a scaling factor of 1e4 in the column Resizing in the row of y.

Here is the end of this tutorial section. You have learned how to work with differential equations and how to use the plotting functionality of MOSAICmodeling.