Consider the time-domain differential equation:
d t d x ( t ) = x 2 ( t )
Let us discretize the function and time itself. Function x 1 is the explicit Euler approximation, and x 2 is the implicit Euler approximation. Let the time step Δ t = 0 . 0 0 1
x 1 k = x 1 k − 1 + x ˙ 1 k − 1 Δ t = x 1 k − 1 + x 1 k − 1 2 Δ t x 2 k = x 2 k − 1 + x ˙ 2 k Δ t = x 2 k − 1 + x 2 k 2 Δ t t k = t k − 1 + Δ t
In the above equations, the k subscript denotes the present processing step, and the k − 1 subscript denotes the previous processing step. The simulation is initialized as follows:
t 0 = 0 x 1 0 = 1 x 2 0 = 1
When t = 0 . 9 , what is x 2 − x 1 , rounded to the nearest integer multiple of 0 . 0 5 ?
Note: For the implicit case, there are two conceivable ways to solve. One of them gives nonsensical results, so use the other.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Problem Loading...
Note Loading...
Set Loading...
For the implicit case, we obtain x k + 1 by solving the following quadratic equation:
x k + 1 = x k + Δ t x k + 1 2
In this case, The roots of the quadratic equation lead to the iteration scheme:
x k + 1 = 2 Δ t 1 ± 1 − 4 Δ t x k
If: x k + 1 = 2 Δ t 1 + 1 − 4 Δ t x k
Then the limit as Δ t → 0 does not lead to x k + 1 = x k . However, using the second root and evaluating the same limit results in x k + 1 = x k which is expected. Essentially, as the time step goes to zero, solutions in two successive time steps become the same.
x k + 1 = 2 Δ t 1 − 1 − 4 Δ t x k
Hence, the above root is the appropriate choice. The following script allows us to evaluate the required result.