MATH3242/COSC3122
FW03
SOLUTIONS TO TERM TEST 2
Wednesday, March 17, 2004
1. (7 marks) Put the following integrals into the standard form for the type of Gaussian integration indicated.
(a) GaussLegendre:
Let x = at + b and choose a and b so that t = 1 when x = 3 and t = 1 when x = 1. this gives x = 2t + 1, dx = 2dt and the integral becomes
(b) GaussLaguerre:
Let 5u = t + b and choose b so that t = 0 when u = 5. This gives 5u = t + 25, 5du = dt and the integral becomes
2. (4 marks) For what values of the parameter q do the following integrals converge?
(a)
Since sin(x) = x + O(x^{3}) the integrand behaves as x^{q3}_{ }near the origin. For this to be integrable q  3 > 1 or q > 2.
(b)
The integrand behaves as e^{(4q)x }at infinity. For this to be integrable, 4  q < 0 or q > 4.
3. (12 marks) Evaluate the improper integral ^{ }by integrating the singular part analytically and using the Elementary Trapezoidal Rule for the remainder.
Since the error term in the Elementary Trapezoidal Rule involves the second derivative of the integrand, we must have n > 2 + 3/2 1. Thus take n = 3. Now
ln(1 + x) = x x^{2}/2 + x^{3}/3 + O(x^{4}) = P_{3}(x) + O(x^{4}).
Thus the integral can be written as
The first integral can be done analytically to yield [2x^{1/2}  x^{3/2}/3 + 2x^{5/2}/15_{0}^{1 }= 27/15
We use the Elementary trapeziodal Rule with h = 1 to evaluate the second integral. Since the integrand is zero at x = 0 since it behaves as x^{43/2 }there this yields [ln(2)  5/6]/2 = 0.0701. Thus the original integral has the approximaate value 27/15  0.0701 = 1.7299
4. (4 marks) Which of the following initialvalue problems satisfy the conditions which guarantee a unique solution? Justify your answer.
(a) y´ = 2y/x^{2} + x^{2}, 1 £ x £ 2, y(1) = 4;
The rhs of the DE is continuous on the domain D and its partial derivative wrt y is 2/x^{2 }which is less than 2 on the interval 1 £ x £ 2. Thus it satisfies a Lipschitz condition and a unique solution is guaranteed.
(b) y´ = x sin(y) + tan(x), 0 £ x £ 2, y(0) = –2
The rhs of the DE is not continuous at pi/2. Thus a unique solution is not satisfied.
5. (3 marks)
(a) Transform the secondorder initialvalue problem
y´´  2x^{2}y´ + 4y^{2} = x^{2}, 0 £ x £ 1, y(0) = 1.4, y´(0) = 0.6
into a system of firstorder differential equations.
Let z = y´. Then the DE can be written as the system:
y´ = z; y(0) = 1.4
z´ = 2x^{2}z  4y^{2} + x^{2}; z(0) = 0.6
6. (6 marks) Solve the initialvalue problem given in question 4 (a) using the RungeKutta Midpoint Method. Take h = 1.0.
Here f(x, y) = 2y/x^{2} + x^{2}, h = 1, k_{1} = f(x_{i}, w_{i}), k_{2} = hf(x_{i }+ h/2, w_{i }+ k_{1}/2)
x_{i} 
w_{i} 
k_{1} 
x_{i} + h/2 
w_{i} + k_{1}/2 
k_{2} 
1. 
4. 
9. 
1.5 
8.5 
9.8055 
2. 
13.8055 




7. (5 marks) Write out the Taylor method of order two for the initialvalue problem
y´ = xy + e^{x}, 1 £ x £ 1, y(1) = 2.4
Here f(x, y) = xy + e^{x}, f´ = y + xy´ + e^{x} = y + x(xy + e^{x}) + e^{x}
Thus the Taylor method of order two is
w_{0} = 2.4
w_{i+1} = w_{i} + h[x_{i}w_{i} + exp(x_{i}) + h/2((x_{i}^{2}+1)w_{i} + (x_{i}+1)w_{i})]
8. (5 marks)
(a) What is the largest degree polynomial whose integral is evaluated exactly using:
i) the Elementary Simpson's Rule? 3
ii) GaussLaguerre integration using 3 points? 5
(b) Give a brief description of the strategy used in the RungeKuttaFehlberg method to control the error in the solution.
The error is estimated by calculating the next value using both a fourth and fifthorder RungeKutta method. From these two values an estimate of the error can be made. The step size is then adjusted to ensure the error tolerance is met while taking the largest step possible.
(c) How are the roots in a Gaussian integration scheme determined?
They are the roots of the associated orthogonal polynomial.