# Math 0250 Homework 4

• 1.2 Number 1
a
First order linear.
b
First order non-linear.
c
First order non-linear.
d
Second order linear.
e
Second order linear.
f
First order non-linear.

• 1.2 Number 3
a
b
c
d
u=t2 + C1 t + C2
e
f

• 1.3 Number 1
a
An integrating factor is . Multiplying through by the integrating factor gives

et u' + et u = 2 et

or equivalently

Integrating both sides gives

et u = 2 et + C

or

u = 2 + C e-t.

b
Multiply by the integrating factor to get

and integrate to get

so

c
Multiply by et2/2 to get

and integrate to get

so

d
Multiply by e-2t to get

so

u = et + C e2t

e
Multiply by et to get

so

f
Multiply by e-t to get

You can evaluate the integral on the right by looking it up in a table, getting help from a computer program, or integrating by parts, but a better way is to complexify'' the integrand to get an exponential. The integrand is the real part of e(-1+i)t, so the integral is the real part of

Since the right hand side has real part

you get

or

g
Start by putting the equation in the standard form

The integtrating factor is , so

so

h
Write the equation in the standard form

The integrating factor is so

The substitution s=1/t, ds = -dt/t2 transforms the integral on the right to

so

• 1.3 Number 2
a
The general solution to the differential equation is

Plugging in the initial condition u(0)=2 gives

so

and so

b
Rewriting the equation in the form

gives the integrating factor , so

and

The initial condition gives C=1, so

c
Integrating both sides gives

t u = t2 + C

and the initial condition gives C=9, so

u = t + 9/t.

d
Integrating both sides gives

(1+t2) u = t2 + C

and the initial condition gives C=1, so

u = 1.

• Supplementary Problem
1.
The difference between the temperature in the house and the outside temperature is

so Newton's Law of cooing takes the form

Since k=3, this becomes

2.
Rearranging to the standard form of a first order linear equation gives

An integrating factor is

and multiplying through by gives

or equivalently

Integrating both sides gives

I evaluated the integral with Mupad, a symbolic computation program (like Mathematica) which is available for free for non-commercial use. You could also do it using an integral table, or with your bare hands (either by double integration by parts, or by expressing the integrand as the real part of a complex exponential).

Solving for T gives

Notice that the last term on the right approaches 0 rapidly as t increases, so regardless of the initial temperature, the solution quickly settles in to the periodic solution

3.
Here are plots of the temperature of the environment and the temperature of the house, with the house temperature plotted as a solid line.

Notice that the temperature of the house varies between -1 and 1 degree centigrade. Notice also that the maximum and minimum temperatures are at around t=0.05 and t=0.505 respectively. (These are very crude estimates from visual inspection of the plot.) Since t is measured in days, these translate to around 1 pm and 1 am respectively. To get more precise estimates, complexify the expression for T. T is the real part of

so the complex amplitude is

The modulus and argument of A are

and

so

This gives

Taking real parts gives

so the maximum and minimum temperatures are . The maximum temperature occurs when . Solving for t gives

Similarly, the minimum occurs when , and solving for t gives

Translating these results to standard time of day gives a maximum temperature at 1:14 pm and a minimum at 1:14 am.

• Computer Problem 1
Here are the relevant lines of computer output. The left column gives values of t, the middle one gives values of the approximate solution, and the last gives values of the exact solution.
0.00000   1.00000   1.00000
2.00000   0.32078   0.33333
4.00000   0.19347   0.20000
6.00000   0.13885   0.14286
8.00000   0.10838   0.11111
10.00000   0.08891   0.09091

Here are plots of the exact solution (shown as a solid line) and the one obtained from Euler's method (shown as a dotted line):

• Computer problem 2
For each of the given increments, run Euler's method to get a table of approximate values, and then generate a table of differences with the exact solution, and display them. For example, with Matlab or Octave, you could use the sequence of commands
h = 1.0;
[T,X] = em(h);
error = 1./(1.+T);
[T',error']

to display a table of errors as a function of T for the increment h=1.0. Repeat for the other values of h. Here's a summary of what I got using Octave, with error values rounded to 5 decimal places.

 h=1 h=0.5 h=0.1 h=0.01 t=5 0.16667 0.02776 0.00503 0.00050 t=10 0.09091 0.01080 0.00200 0.00020

Notice how the errors decrease as the increment decreases.

Frank Beatrous
1998-10-05