Lilliana Livingston

Answered

2022-07-20

I have already posted question where I was asking about sketching Euler method.

The explicit Euler method for numerically solving the begining values of differential equation $x\prime =f(t,x),x({t}_{0})={x}_{0}$ on the interval $I=[{t}_{0},T]$ is given by

${x}_{k+1}={x}_{k}+hf({t}_{k},{x}_{k}),k=0,\dots ,N-1$ with $h=(T-{t}_{0})/N,N\in N.$

${X}_{k}$ is an approximation of the exact solution $x(t)$ of the begining values at time ${t}_{k}:={t}_{0}+kh,k=0,...,N.$ By linear interpolation between the points $({t}_{k},{x}_{k})$ and $({t}_{k+1},{x}_{k+1}),k=0,...,N-1,$ we obtain a approximation solution ${x}_{h}(t)$.

I need to calculate an approximation of the solution of the begining values at the point $t=1$

${x}^{\prime}=-t/x,x(0)=1$

I need to use h = 0.5. Specify ${x}_{h}$(1) and calculate the error, that is difference ${x}_{h}$(1)−$x$(1), where $x$(1) is the value of the exact solution.

I really don't know how to start. How can I calulate $x$ or ${x}_{h}$ at all?

The explicit Euler method for numerically solving the begining values of differential equation $x\prime =f(t,x),x({t}_{0})={x}_{0}$ on the interval $I=[{t}_{0},T]$ is given by

${x}_{k+1}={x}_{k}+hf({t}_{k},{x}_{k}),k=0,\dots ,N-1$ with $h=(T-{t}_{0})/N,N\in N.$

${X}_{k}$ is an approximation of the exact solution $x(t)$ of the begining values at time ${t}_{k}:={t}_{0}+kh,k=0,...,N.$ By linear interpolation between the points $({t}_{k},{x}_{k})$ and $({t}_{k+1},{x}_{k+1}),k=0,...,N-1,$ we obtain a approximation solution ${x}_{h}(t)$.

I need to calculate an approximation of the solution of the begining values at the point $t=1$

${x}^{\prime}=-t/x,x(0)=1$

I need to use h = 0.5. Specify ${x}_{h}$(1) and calculate the error, that is difference ${x}_{h}$(1)−$x$(1), where $x$(1) is the value of the exact solution.

I really don't know how to start. How can I calulate $x$ or ${x}_{h}$ at all?

Answer & Explanation

Deacon Nelson

Expert

2022-07-21Added 13 answers

You find $x$ by solving the differential equation. It has separeted variables, and the solutiion is easily found to be $x(t)=\sqrt{1-{t}^{2}}$. Then $x(1)=0$.

To apply Euler's method we have ${t}_{0}=0$, $T=1$, ${x}_{0}=1$, $h=0.5$ and hence $N=2$. Then

${x}_{k+1}={x}_{k}-h\phantom{\rule{thinmathspace}{0ex}}\frac{k\phantom{\rule{thinmathspace}{0ex}}h}{{x}_{k}}.$

Find ${x}_{1}$ and then ${x}_{2}$.

To apply Euler's method we have ${t}_{0}=0$, $T=1$, ${x}_{0}=1$, $h=0.5$ and hence $N=2$. Then

${x}_{k+1}={x}_{k}-h\phantom{\rule{thinmathspace}{0ex}}\frac{k\phantom{\rule{thinmathspace}{0ex}}h}{{x}_{k}}.$

Find ${x}_{1}$ and then ${x}_{2}$.

Most Popular Questions