0

I am tasked with the following exercise:

Suppose we have 2 cars, and that car 2 has experienced engine failure and is stationary at position $x_2(t) = \bar{x}$. Let $x_1(0) = > \bar{x} - d$. Introduce the variable $\widetilde{x}(t) = \bar{x} - > x_1(t)$ and derive the differential equation for $\widetilde{x}(t)$ under the assumption that $f(x) = \frac{v_{\text{max}}}{d} x$. What is the stability condition for the time step $h$ in discretization with forward Euler? Compare with the answer in a), which condition is more stringent?

$$x_1^{n+1} = x_1^n + hf \\ x_2^{n+1} = x_2^n + hg$$

We are interested in the ODE

$$\widetilde{x}^{n+1} = \widetilde{x}^n + hf \\$$ where $$f = \frac{v}{d} \cdot x_1 \quad \text{and} \quad x_1 = \bar{x} - \widetilde{x}$$ and v (=speed), d (=distance to car 2), $\bar{x}$ are constants.

My attempt so far:

$$\widetilde{x}^{n+1} = \widetilde{x}^n + h\left( -\frac{v}{d} \cdot \left( \bar{x} - \widetilde{x}^n \right) \right)$$

and then $$ -\frac{v}{d} \cdot \left( \bar{x} - \widetilde{x}^n \right) = -\frac{v}{d} \cdot \left( \frac{\bar{x}}{\widetilde{x}^n} - 1 \right) \cdot \widetilde{x}^n$$ so that we can write

$$ \widetilde{x}^{n+1} = \widetilde{x}^n \left( 1 + h\left(-\frac{v}{d} \left(\frac{\bar{x}}{\widetilde{x}^n} - 1\right)\right) \right) $$

I am trying to find an expression for which I can easily use the rule of thumb $\frac{2}{|\lambda|}$ but I fail to see how to express $\lambda$ in a simpler manner.

I can only get rid of ${\widetilde{x}^n}$ in the denominator by invoking initial conditions such that ${\widetilde{x(0)} = d}$, but even then I awkward answers, and in the attempts ive made at best I have gotten answers equal to the one they refer to in part a) (which was $h < 6$), and not a different answer which they seem to be eluding one ought to get.

Can anyone tell if I am on the right track or not? Thanks.

  • Could you please re-arrange the parts of your problem description so that the ODE system is concluded before you start with Euler or any other method, and only after that start discussing the properties of the numerical solution? These should be minimal changes after moving some text around. // What is $\tilde x$ what operation is "$->$"? // Why Euler? One can abstract the stepper out of the time loop and implement any other method as stepper. Then the (fixed-step) time loop still looks simple, and the implemented method is flexible. – Lutz Lehmann Dec 09 '23 at 10:03

0 Answers0