Due on November 2 at 11:59pm electronically via email.
Use a word-processor like Microsoft Word or LibreOffice (free), or \( \LaTeX \) (also free) to create a single PDF file with all of your answers. If you want to include code, do not put them in this file. This file should include your graphs, equations, tables, and explanations. The name of this file should have the following format: LASTNAME_STUDENTNUMBER_3.pdf. You can hand-write your answers, but you will have to scan your papers, or take a picture of them. In any case, send me one PDF file. I will not accept paper submissions.
If you want to include multiple code files (.m or .py files), put them all in one folder, zip the folder, and send me only one zip file. The name of this file should look like this: LASTNAME_STUDENTNUMBER_A3.zip
Attach both files to an email and send it to msamani[at]fields.utoronto.ca. Make sure the title of the email starts with MATH3090.
Question 1: Use the classical Runge-Kutta method, described at the bottom of page 190 and top of page 191 of the textbook, to solve the following initial-value differential equations:
Questions from the textbook:
6.3, 7.19, 11.2
For 6.3, I would like to see a plot of relative error versus \( n \), for a reasonable range of \( n \).
For 11.2.b, you can use the following code to produce the exact solution:
% MATLAB syms u(x) dsolve(diff(u,x,2) == exp(-x^2))
# Python from sympy import * from sympy.abc import x u = Function('u') dsolve(Derivative(u(x), (x,2)) - exp(-x**2))They both produce the following function: $$ \DeclareMathOperator\erf{erf} u(x) = C_1 + C_2 x + e^{-x^2/2} + \frac{\sqrt{\pi}}{2} x \erf(x) $$ to which you can apply the boundary conditions in order to find \( C_1 \) and \( C_2 \).