Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

$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.

share|improve this question
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$. –  littleO Nov 12 '12 at 7:56

2 Answers 2

up vote 1 down vote accepted

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$$

share|improve this answer
The solutions says that the initial conditions are $x_1(0) = 0$ and $x_2(0) = 1$. Is this incorrect? –  Bob John Nov 12 '12 at 7:38
That doesn't correspond to $x(0)=1$ and $x^\prime(0)=1$, which is what you have above. Since $x_1=x$, $x_1(0)$ should be 1 as well. $x_2=x_1^\prime=x^\prime$, so $x_2(0)=1$ is correct. –  icurays1 Nov 12 '12 at 8:21
Fair enough. So the second equation isn't used for anything- the $x_2'$? –  Bob John Nov 12 '12 at 8:51
You need to update both $x_1$ and $x_2$, and the $x_2'$ equation is used to update $x_2$. –  littleO Nov 12 '12 at 9:26
So when it says find $x(0.2)$ I really need to find $x_1(0.2)$ and $x_2(0.2)$, correct? –  Bob John Nov 12 '12 at 9:40

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}

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.