If Euler’s method with step size\[{\bf{h = }}\frac{{\bf{1}}}{{\bf{n}}}\], where nis a positiveinteger, is used to approximate the solution to the initial value problem\[\frac{{{\bf{dy}}}}{{{\bf{dx}}}}{\bf{ + y = 0,y(0) = 1}}\] what formula (expressed as a function of n) do you obtain for the approximation of y (1 ) ? What is the exact value of y (1 )?

Short Answer

Expert verified

\[{y_0} = {\left( {1 - \frac{1}{n}} \right)^n}\], \[{\bf{y}}\left( {\bf{1}} \right) = {{\bf{e}}^{{\bf{ - 1}}}} \approx 0.3679\]

Step by step solution

01

Finding the value of f (x)

Here,

\[\begin{array}{c}\frac{{{\bf{dy}}}}{{{\bf{dx}}}}{\bf{ = - y}}\\\frac{{\bf{1}}}{{\bf{y}}}\frac{{{\bf{dy}}}}{{{\bf{dx}}}}{\bf{ = - 1}}\\\int {\frac{{\bf{1}}}{{\bf{y}}}\frac{{{\bf{dy}}}}{{{\bf{dx}}}}{\bf{ = }}\int {{\bf{ - dx}}} } \\{\bf{ln}}\;{\bf{u = ln}}\;{\bf{y = - x + c}}\end{array}\]

So,\[{\bf{y = }}{{\bf{e}}^{{\bf{( - x + c)}}}}\]

By using the initial conditions \[{\bf{y(0) = 1,}}\;{\bf{c = 0}}\]then

\[{\bf{y(x) = }}{{\bf{e}}^{{\bf{ - x}}}}\]

02

Using Euler’s method.

f(x,y)=-y

\[\begin{array}{c}{{\bf{y}}_{{\bf{n + 1}}}}{\bf{ = }}{{\bf{y}}_{\bf{n}}}{\bf{ + h}}\;{\bf{f(x,y)}}\\{\bf{ = }}{{\bf{y}}_{\bf{n}}}{\bf{ - }}\frac{{\bf{1}}}{{\bf{n}}}{{\bf{y}}_{\bf{n}}}\\{{\bf{y}}_{\bf{1}}}{\bf{ = }}\frac{{{\bf{n - 1}}}}{{\bf{n}}}\\{{\bf{y}}_{\bf{2}}}{\bf{ = }}{\left( {\frac{{{\bf{n - 1}}}}{{\bf{n}}}} \right)^{\bf{2}}}\\{\bf{.}}\\{\bf{.}}\\{\bf{.}}\\{{\bf{y}}_{\bf{k}}}{\bf{ = }}{\left( {\frac{{{\bf{n - 1}}}}{{\bf{n}}}} \right)^{\bf{k}}}{\bf{.}}{{\bf{y}}_{\bf{o}}}\end{array}\]

\[\begin{array}{l}{\bf{y(1) = }}{\left( {\frac{{{\bf{n - 1}}}}{{\bf{n}}}} \right)^{\bf{n}}}\\{y_0} = {\left( {1 - \frac{1}{n}} \right)^n}\end{array}\]

03

Finding the values for another n

Comparing the \[{\bf{y(1) = }}{{\bf{e}}^{{\bf{ - 1}}}}{\bf{ = 0}}{\bf{.3678}}\]as n increases

\[\begin{array}{*{20}{l}}{For{\rm{ }}n = 10,{\rm{ }}then{\rm{ }}0.3486,{\rm{ }}error = 0.0192}\\{For{\rm{ }}n = 100,{\rm{ }}then{\rm{ }}0.36603,{\rm{ }}error = 0.0018}\\{For{\rm{ }}n = 500,{\rm{ }}then{\rm{ }}0.3675,{\rm{ }}error{\rm{ }} = 0.0004}\\{For{\rm{ }}n = 1000,{\rm{ }}then{\rm{ }}0.3676,{\rm{ }}error = 0.002}\\{For{\rm{ }}n = 5000,{\rm{ }}then{\rm{ }}0.36784,{\rm{ }}error = 0.000037}\end{array}\]

Therefore the solution is\[{y_0} = {\left( {1 - \frac{1}{n}} \right)^n}\], \[{\bf{y}}\left( {\bf{1}} \right) = {{\bf{e}}^{{\bf{ - 1}}}} \approx 0.3679\].

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Newton’s law of cooling states that the rate of change in the temperature T(t) of a body is proportional to the difference between the temperature of the medium M(t) and the temperature of the body. That is, dTdt=KMt-Ttwhere K is a constant. Let K=0.04min-1and the temperature of the medium be constant, Mt=293kelvins. If the body is initially at 360 kelvins, use Euler’s method with h = 3.0 min to approximate the temperature of the body after

(a) 30 minutes.

(b) 60 minutes.

In Problems 13-16, write a differential equation that fits the physical description. The rate of change of the mass A of salt at time t is proportional to the square of the mass of salt present at time t.

In problems 1-6, identify the independent variable, dependent variable, and determine whether the equation is linear or nonlinear.

t3d3xdt32+3t-x=0

(a) Show thatϕx=x2 is an explicit solution toxdydx=2y on the interval (-,).

(b) Show that ϕ(x)=ex-x, is an explicit solution todydx+y2=ex+1-2xex+x2-1 on the interval (-,).

(c) Show thatϕx=x2-x-1 is an explicit solution tox2d2ydx2=2y on the interval (0,).

Variation of Parameters. Here is another procedure for solving linear equations that is particularly useful for higher-order linear equations. This method is called variation of parameters. It is based on the idea that just by knowing the form of the solution, we can substitute into the given equation and solve for any unknowns. Here we illustrate the method for first-order equations (see Sections 4.6 and 6.4 for the generalization to higher-order equations).

(a) Show that the general solution to (20)dydx+P(x)y=Q(x) has the formy(x)=Cyh(x)+yp(x),whereyh ( 0is a solution to equation (20) when Q(x)=0,

C is a constant, andyp(x)=v(x)yh(x) for a suitable function v(x). [Hint: Show that we can takeyh=μ-1(x) and then use equation (8).] We can in fact determine the unknown function yhby solving a separable equation. Then direct substitution of vyh in the original equation will give a simple equation that can be solved for v.

Use this procedure to find the general solution to (21) localid="1663920708127" dydx+3xy=x2, x > 0 by completing the following steps:

(b) Find a nontrivial solutionyh to the separable equation (22) localid="1663920724944" dydx+3xy=0, localid="1663920736626" x>0.

(c) Assuming (21) has a solution of the formlocalid="1663920777078" yp(x)=v(x)yh(x) , substitute this into equation (21), and simplify to obtain localid="1663920789271" v'(x)=x2yh(x).

d) Now integrate to getlocalid="1663920800433" vx

(e) Verify thatlocalid="1663920811828" y(x)=Cyh(x)+v(x)yh(x) is a general solution to (21).

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free