#$&*
course MTH 279
Query 11 Differential Equations *********************************************
Question: 3.8.4. Solve the equation y ' = - y + t with y(0) = 0.
Write the expression y_(k + 1) = y_k + h f (t_k, y_k) for h = .01.
Find y_k for k = 0, 1, 2, 3.
Using your original solution for the equation, compare your values of y_k with the values given by the accurate solution.
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Your solution:
We know that f(t_k,y_k) = -y + t and h = .01. We also know that y(0) = 0.
Setting up our equation we have
f(0,0) = -(0) + (0) = 0
f(1,0) = -(0) + 1 = 1
f(2,.01) = -(.01) + 2 = 1.99
f(3, 0.0299) = -(0.0299) + 3 = 2.9701
k = 0: y_(1) = y_0 + h f(t_0, y_0) = 0 + (.01)f(0,0) = 0
k = 1: y_(2) = y_1 + h f(t_1, y_1) = 0 + (.01)f(1,0) = (.01)(1) = .01
k = 2: y_(3) = y_2 + h f(t_2, y_2) = .01 + (.01)f(2,.01) = .01 + (.01)(1.99) = 0.0299
k = 3: y_(4) = y_3 + h f(t_3, y_3) = 0.0299 + (.01)f(3,0.0299) = 0.0299 + (.01)2.9701 = 0.059601
confidence rating #$&*:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.............................................
Given Solution:
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Self-critique (if necessary):
------------------------------------------------
Self-critique rating:
*********************************************
Question: 3.8.6. Euler's method applied to the equation y ' = alpha t + beta, y(t_0) = y_0,
yields y values -1, -.9, -.81 and -.73 at respective t values 0, .1, .2, .3.
Find the values of alpha, beta, t_0 and y_0.
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Your solution:
The first thing we know is f(t,y) = y' = alpha t + beta. Knowing our t values, we can see that the step size, h = 0.1.
First we set up our equations:
-1 = y_0 + (.1)(alpha(0) + beta)
-.9 = -1 + (.1)(alpha(.1) + beta)
-.81 = -.9 + (.1)(alpha(.2) + beta)
-.73 = -.81 + (.1)(alpha(.3) + beta)
Then we need to start solving for our unknowns (alpha, beta, t_0, and y_0).
First I solved for beta for two equations:
beta = ((-.81 + .9)/.1) - alpha(.2); beta = ((-.73 + .81)/.1) - alpha(.3)
Then I set them equal to each other to solve for alpha:
((-.81 + .9)/.1) - alpha(.2) = ((-.73 + .81)/.1) - alpha(.3), which allows us to find that alpha = 1.67.
@&
Good, but I believe the solution to your equations is alpha = 1.
*@
@&
This of course affects your solution for beta.
*@
Plugging in alpha,
we find that beta = 0.299, leaving y_0 to equal -1.0299. t_0 = 0.
confidence rating #$&*:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.............................................
Given Solution:
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Self-critique (if necessary): I am having a hard time working through the logic backward. Not sure if I approached finding alpha, beta, t_0, and y_0 correctly.
@&
You've set this up well. What you're doing should work. I think there's just a simple arithmetic error in your solution for alpha.
*@
------------------------------------------------
Self-critique rating:
*********************************************
Question: 3.8.8a. For each of the following situations, will Euler's method overestimate or underestimate the values of the solution to an equation:
The solution curve is known to be increasing and concave up.
The solution curve is known to be increasing and concave down.
The solution curve is known to be decreasing and concave up.
The solution curve is known to be decreasing and concave down.
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Your solution:
The solution curve is known to be increasing and concave up.
This graph would be an example of exponential growth. Since the curve is concave up, Euler's method will underestimate.
The solution curve is known to be increasing and concave down.
Since the curve is concave down, Euler's method will overestimate.
The solution curve is known to be decreasing and concave up.
Since the curve is concave up, Euler's method will underestimate.
The solution curve is known to be decreasing and concave down.
Since the curve is concave down, Euler's method will overestimate.
confidence rating #$&*:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.............................................
Given Solution:
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Self-critique (if necessary):
------------------------------------------------
Self-critique rating:
*********************************************
Question: 3.8.14. y ' = y^2 with y(0) = 1.
Solve the equation.
Perform Euler's Method to approximate the values of the solution on the t interval [0, 1.2] with step size h = .1.
Compare the values you get with the values given by your solution to the equation.
This could be done by hand, but it would take awhile and the probability of an error would be relatively high. A spreadsheet is recommended.
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Your solution:
We know that y' = f(x,y) = y^2, and y(0) = 1. We are given the t interval [0, 1.2] and step size h = .1.
Using the formula for Euler's Method we know y((subscript)n+1) = y((subscript)n) + h f(t(subscript)n,y(subscript)n).
Using a spreadsheet, I get the following values:
x y
0 1
0.1 1.1
0.2 1.221
0.3 1.37008
0.4 1.55780
0.5 1.80047
0.6 2.12464
0.7 2.57605
0.8 3.23965
0.9 4.28919
1 6.12890
1.1 9.88524
1.2 19.65703
@&
Your solutions look plausible. They are underestimates, since y^2 is concave down.
In fact the solution to the equation has a vertical asymptote at t = 1.
Since your approximations were underestimates we would expect that the approach of the approximate solution to the asymptote would be a little delayed.
*@
confidence rating #$&*:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.............................................
Given Solution:
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Self-critique (if necessary):
------------------------------------------------
Self-critique rating:
"
@&
You can compare your solutions with the following:
Query 11 Differential Equations
Question: 3.8.4. Solve the equation y ' = - y + t with y(0) = 0.
Write the expression y_(k + 1) = y_k + h f (t_k, y_k) for h = .01.
Find y_k for k = 0, 1, 2.
Using your original solution for the equation, compare your values of y_k with the values given by the accurate solution.
Your solution:
Confidence rating:
Given Solution:
The equation is easily solved:
Rearrange to the form y ' + y = t, which is linear nonhomogeneous.
An integrating factor is e^t, yielding
e^t y ' + e^t y = t e^t or
(y e^t) ' = t e^t
with solution
y e^t = integral(t e^t dt) = t e^t - e^t + c.
With y(0) = 0 we get c = 1 to our solution is
y(t) = (t e^t - e^t + 1) / e^t = t - 1 + e^-t.
Our approximation will give us approximate values of y(.01), y(.02), y(.03) and y(.04). The actual values are
.0000498, 0.0001987, 0.0004455, 0.0007894.
Our function is
f(y, t) = y ' = -y + t.
Our initial values are y_0 = 0 and t_0 = 0, and h = .01.
For k = 0 we get
y_1 = y_0 + .01 f (t_0, y_0) = 0 + .01 * 0 = 0.
For k = .1 we get
y_2 = y_1 + .01 f (t_1, y_1) = 0 + .01 f(.01, 0) = 0 + .01 * .01 = .00001.
y_3 = y_2 + .01 f (t_2, y_2) = .0001 + .01 * (.02 - .00001) = .0001 + .01 * .01999 = .0002999.
y_4 = y_3 + .01 f (t_3, y_3) = .000299 + .01 * (.03 - .00299) = .00299 + .02701 = .0058.
Self-critique (if necessary):
Self-critique rating:
Question: 3.8.6. Euler's method applied to the equation y ' = alpha t + beta, y(t_0) = y_0, yields y values -1, -.9, -.81 and -.73 at respective t values 0, .1, .2, .3. Find the values of alpha, beta, t_0 and y_0.
Your solution:
Confidence rating:
Given Solution:
t starts at 0, at which point y = -1. So t_0 = 0 and y_0 = -1.
Between t = 0 and t = .1, y changes by +.1 so y ' (0) * .1 = .1. Thus y ' (0) = 1. It follows that y ' (0) = alpha * 0 + beta = beta, and that beta is therefore equal to y ' (0), which we have just found to be 1. That is, beta = 1.
Between t = .1 and t = .2, y changes by .09, so y ' (.1) * .1 = .09 and y ' (.1) = .9. Thus y ' (.1) = alpha * .1 + beta = .1 * alpha + 1, and y ' (.1) = .9. It follows that alpha * .1 + 1 = .9 so alpha = -1.
Self-critique (if necessary):
Self-critique rating:
Question: 3.8.8a. For each of the following situations, will Euler's method overestimate or underestimate the values of the solution to an equation:
The solution curve is known to be increasing and concave up.
The solution curve is known to be increasing and concave down.
The solution curve is known to be decreasing and concave up.
The solution curve is known to be decreasing and concave down.
Your solution:
Confidence rating:
Given Solution:
If the solution curve is increasing and concave up, the derivative is positive and increasing. Applying the derivative at the left-hand endpoint of our approximation interval, we will be using the minimum value of the derivative on that interval, thereby underestimating the rate of change. Our approximation will therefore be an underestimate.
If the solution curve is increasing and concave down, the derivative is positive and decreasing. Applying the derivative at the left-hand endpoint of our approximation interval, we will be using the maximum value of the derivative on that interval, thereby overestimating the rate of change. Our approximation will therefore be an overestimate.
If the solution curve is decreasing and concave up, the derivative is negative and increasing. Applying the derivative at the left-hand endpoint of our approximation interval, we will be using the minimum value of the derivative on that interval, thereby underestimating the rate of change. Our approximation will therefore be an underestimate.
If the solution curve is decreasing and concave down, the derivative is negative and decreasing. Applying the derivative at the left-hand endpoint of our approximation interval, we will be using the maximum value of the derivative on that interval, thereby overestimating the rate of change. Our approximation will therefore be an overestimate.
Self-critique (if necessary):
Self-critique rating:
Question: 3.8.14. y ' = y^2 with y(0) = 1.
Solve the equation.
Perform Euler's Method to approximate the values of the solution on the t interval [0, 1.2] with step size h = .1.
Compare the values you get with the values given by your solution to the equation.
This could be done by hand, but it would take awhile and the probability of an error would be relatively high. A spreadsheet is recommended.
The equation can be written
dy/dt = y^2
and rearranged to the form
dy / y^2 = dt.
Integrating both sides we get
-1/y = t + c.
Solving for y we obtain
y = -1 / (t + c).
The condition y(0) = 1 gives us
-1 / (0 + c) = 1
which solved for c yields
c = -1
so our solution is
y(t) = 1 / (t - 1).
Note that this function is undefined for t = 1, approaching a vertical asymptote as t -> 1.
Now our numerical solution
Your solution:
Confidence rating:
Given Solution:
Self-critique (if necessary):
Self-critique rating:
*@