0
$\begingroup$

$x'' - tx' + x^2 = t$

$x(0) = 1$

$x'(0) = 1$

a) Restate the problem solving a system of first-order ODEs.

$x_1' = x_2$

$x_2' = t-x_1^2+tx_2$

$x_1(0) = 1$

$x_2(0) = 1$

b) Use part a) and Euler's method with h = 0.1 to find x(0.2).

$x(0.1) = 1 + (0.1)(0-1+0) = 0.9$

Is my work up to this point correct? I'm unsure whether this should actually be two equations.

  • 0
    Let $\hat{x}(t) = \begin{bmatrix} x_1(t) \\ x_2(t) \end{bmatrix}$. Write the first-order differential equation that $\hat{x}$ satisfies (you've basically done this already), and then use Euler's method to estimate $\hat{x}(.1)$ and $\hat{x}(.2)$. In other words, use Euler's method to estimate both $x_1$ and $x_2$.2012-11-12

2 Answers 2

1

Your part a) is correct, but for part b) remember that you've made $x_1=x$. Thus finding an approximate value for $x(0.2)$ is equivalent to finding an approximate value for $x_1(0.2)$, which you would find using the first of your two equations (looks like you've used the second one).

With the first equation, we use Euler's method to obtain the approximation $x_1(0.2)\approx x_1(0.1)+0.1\cdot x_2(0.1)$. We don't have $x_1(0.1)$ and $x_2(0.1)$ yet, we need to approximate them using Euler's method. Using the first equation, $x_1(0.1)\approx x_1(0)+0.1\cdot x_2(0)=1.1$. Using the second equation, $x_2(0.1)\approx x_2(0)+0.1\cdot (0-x_1(0)^2+0)=0.9$. Thus finally, $x_1(0.2)\approx 1.1+0.1\cdot 0.9=1.19$

  • 0
    You can estimate $x_2(.2)$ if you like, but this problem only asked for $x(.2) = x_1(.2)$. (In order to get $x_1(.2)$, you're going to need estimates of $x_1(.1)$ and $x_2(.1)$.)2012-11-12
0

Let $\hat{x}(t) = \begin{bmatrix} x_1(t) \\ x_2(t) \end{bmatrix}$. Then $\hat{x}$ satisfies \begin{equation} \hat{x}'(t) = f(t,\hat{x}(t)) \end{equation} for an appropriate function $f:\mathbb{R}^2 \to \mathbb{R}^2$. Now use Euler's method to estimate $\hat{x}(.1)$ and $\hat{x}(.2)$.

For example, \begin{equation} \hat{x}(.1) \approx \hat{x}(0) + .1 f(0,\hat{x}(0)). \end{equation}