Home page for accesible maths 8 Homework and quiz exercises

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

8.8 Quiz 4

Please submit solutions to the following via moodle by 23:59 on Wednesday 14th December. Each question is worth [2] marks. For Q4.3-Q4.5, please see Week09Looping.pdf.

Q4.1Two integrals. Calculate

I=0e-ycosxydyI=\int_{0}^{\infty}e^{-y}\cos xy\,dy

and hence find

J=010e-ycosxydydx.J=\int_{0}^{1}\!\!\!\int_{0}^{\infty}e^{-y}\cos xy\,dydx.

One of the following is true.

(A) I=1/(x+x2)I=1/(x+x^{2}) and JJ diverges. \;\;\;\; (B) I=x/(1+x2)I=x/(1+x^{2}) and J=12log2J={{1}\over{2}}\log 2.

(C) I=1/(1+x2)I=1/(1+x^{2}) and J=π/4J=\pi/4. \;\;\;\; (D) II diverges; \;\;\;\; (E) I=1/(1+x2)I=1/(1+x^{2}) and J=log2J=\log 2.

Q4.2Stationary points. The stationary points of f(x,y)=16x3+y2+xyf(x,y)=\frac{1}{6}x^{3}+y^{2}+xy are classified in the following.

(A) There are four stationary points.

(B) There is a saddle at (0,0)(0,0) and a local minimum at (1,-1/2)(1,-1/2).

(C) There is a saddle at (0,0)(0,0) and a local maximum at (1,-1/2)(1,-1/2).

(D) There is a local maximum at (0,0)(0,0) and a local minimum at (1,-1/2)(1,-1/2).

(E) There is an inflexion at (0,0)(0,0) and a local minimum at (1,1/2)(1,1/2).

Q4.3Newton-Raphson method (i). One procedure for which a while loop is useful for implementation is the Newton-Raphson method for finding the roots of the differentiable function f(x)f(x). This algorithm iterates the following recursion

xn=xn-1-f(xn-1)f(xn-1),\displaystyle x_{n}=x_{n-1}-\frac{f(x_{n-1})}{f^{\prime}(x_{n-1})},

whilst the difference between successive evaluations is greater than a specified small value. Consider using the Newton-Raphson method to find one of the roots of the function:

f(x)\displaystyle f(x) =\displaystyle= x4-4x2-367\displaystyle x^{4}-4x^{2}-\frac{36}{7}

Take x0=-4{\color{blue}\colorlet{pgfstrokecolor}{.}x_{0}=-4} as the your starting point and use

|xn-xn+1|1×10-5\displaystyle|x_{n}-x_{n+1}|\leq 1\times 10^{-5}

as the convergence criterion.

Give the value of xn{\color{blue}\colorlet{pgfstrokecolor}{.}x_{n}} at convergence to 2 decimal places.

Q4.4Newton-Raphson method (ii). Determine the number of iterations needed to reach convergence i.e. the first n{\color{blue}\colorlet{pgfstrokecolor}{.}n} for which

|xn-xn+1|1×10-5.\displaystyle|x_{n}-x_{n+1}|\leq 1\times 10^{-5}.

Q4.5Hénon Map. The Hénon map is defined by the recursion equations

xn+1\displaystyle x_{n+1} =\displaystyle= yn+1-axn2\displaystyle y_{n}+1-ax_{n}^{2}
yn+1\displaystyle y_{n+1} =\displaystyle= bxn\displaystyle bx_{n}

Write some R code to produce sequences xn,yn{\color{blue}\colorlet{pgfstrokecolor}{.}x_{n},y_{n}} as above, up to n=1000{\color{blue}\colorlet{pgfstrokecolor}{.}n=1000}, starting at x0=y0=0{\color{blue}\colorlet{pgfstrokecolor}{.}x_{0}=y_{0}=0}, for parameters a,b{\color{blue}\colorlet{pgfstrokecolor}{.}a,b} as follows.

(i) a=1.15,b=0.45{\color{blue}\colorlet{pgfstrokecolor}{.}a=1.15,b=0.45}, (iii) a=1.4,b=0.3{\color{blue}\colorlet{pgfstrokecolor}{.}a=1.4,b=0.3}

(ii) a=1.05,b=0.5{\color{blue}\colorlet{pgfstrokecolor}{.}a=1.05,b=0.5}, (iv) a=1.2,b=0.2{\color{blue}\colorlet{pgfstrokecolor}{.}a=1.2,b=0.2}

(Please submit this to Paul Levy.)