Task 1

Solution

Constant means the degree is

Task 2

Solution

230507 Quadrature - Derivation and Formulae Quadrature error estimation

  • Check:
  • Therefore

Error bound (in formulary)

For : is a polynomial of degree .

Since the trapezoid rule has degree of accuracy 1, it integrates all polynomials of degree exactly.

Therefore, the quadrature error is exactly 0 .

Exam relevance: Error estimation formulas are frequently tested!

Task 3

Solution

Part (a) - Romberg Extrapolation for Forward Difference Quotient

The forward difference quotient has the form:

From Taylor expansion:

Rearranging, we have

This shows the forward difference quotient has convergence order 1. Applying Romberg extrapolation Let and

Then we have

Using Romberg’s formula with :

Convergence order 2.

Substituting to get the calculation formula:

Common Mistakes

Why do we consider the full Taylor Polynomial? Because is acts as the Blueprint for the error. Note that in Romberg extrapolation is basically a clever trick to cancel out the errors.
Why expand up to and not directly use the notation? Same answer as above: We need the term so that we can cancel it out!

Part (b) - Numerical Approximations

For at with :

Exact derivative: , so

Forward difference quotient:

Romberg scheme from (a):

Central difference quotient:

Comparison with exact value :

  • Forward difference: (error = )
  • Romberg scheme: (error = )
  • Central difference: (error = )

The Romberg scheme provides the best approximation, as expected from its higher convergence order.

Task 4 (Nonlinear Equations)

Note: Newton’s method formulas are available in the formulary.

Part a) Derive Newton’s method from Taylor expansion (1 point)

Taylor expansion of around point :

To find the zero, we set this linear approximation equal to zero:

Solving for gives us the next iterate:

Therefore, Newton’s method is:

Part b) Calculate two Newton steps (2 points)

For , we have Starting from :

Explanation: Newton’s method approximates by its tangent line at each iteration and finds where the tangent intersects the axis. center Sketch should show parabola , starting point , tangent line at intersecting axis at , then tangent at intersecting at

Part c) Connection to Banach iteration and convergence order (2 points)

At the root where :

Since , Newton’s method has quadratic convergence (order 2) near the root, assuming and exists.

This means the error approximately squares in each iteration: for some constant

Task 5

Solution

a) Maximal Step Size and System Property

To find the maximal step size for the explicit Euler method, we first need the eigenvalues of the system matrix . Since the matrix is upper triangular, the eigenvalues are its diagonal entries:

The explicit Euler method is stable if for all eigenvalues , the step size satisfies the condition:

Since our eigenvalues are real and identical, we only need to solve for :

This inequality can be split into two parts:

Solving for :

The maximal step size is .

A property of this system is that it is not stiff. A system is considered stiff if the ratio of the largest to the smallest absolute value of the real parts of the eigenvalues is large. Here, the ratio is , which is the opposite of stiff.

b) Two Steps with h = 0.5

The explicit Euler method is given by the formula:

Given , , and .

Step 1: Calculate First, we calculate the product :

Now we find :

Step 2: Calculate First, we calculate the product :

Now we find :

After two steps, the solution is .

Task 5B

Consider differential equation:

a) The Crank-Nicolson method is known to be A-stable. Explain what A-stability implies for the choice of step size when solving this particular system. Is this method a good choice for this system?

b) Perform one step of the Crank-Nicolson method with a step size of to find the approximation .

a) A-Stability and Method Suitability

A numerical method is A-stable if its stability region contains the entire left half of the complex plane, . The Crank-Nicolson method is A-stable.

The eigenvalues of the system matrix are , which are on the negative real axis (i.e., in the left half-plane). Because the method is A-stable, the term will lie within the stability region for any positive step size .

This means that for the Crank-Nicolson method, there is no upper limit on the step size imposed by stability. The choice of can be based purely on the desired accuracy of the solution. This makes it a very robust and good choice, especially for stiff differential equations.

b) One Step of Crank-Nicolson with h = 1.0

The Crank-Nicolson method for a system is given by:

To solve for the unknown vector , we must first rearrange the formula into a linear system of equations:

Given , , and .

1. Set up the linear system: First, we compute the matrices on the left and right sides.

  • Left-Hand Side Matrix:

  • Right-Hand Side Vector:

The system to solve for is:

2. Solve for : Let . We can solve the system using back substitution.

  • From the second row: .
  • From the first row: .

The solution after one step is:

Task 5C

Consider the differential equation:

a) The implicit Euler method is known to be A-stable. Explain what this implies for the choice of step size when solving this system.

b) Perform one step of the implicit Euler method with a step size of to find the approximation .

Solution

a) A-Stability and Method Suitability

A numerical method is A-stable if its stability region contains the entire left half of the complex plane, . The implicit Euler method is A-stable.

The eigenvalues of the system matrix are , which are in the left half-plane. Because the method is A-stable, the term will always lie inside the stability region for any positive step size .

This means there is no upper limit on the step size for stability. The choice of can be based purely on the desired accuracy of the solution, making the method very robust.

b) One Step of Implicit Euler with h = 1.0

The implicit Euler method is given by the formula:

To solve for the unknown vector , we must rearrange the formula into a linear system of equations:

Given , , and .

1. Set up the linear system: First, we compute the matrix on the left-hand side:

The system to solve for is:

2. Solve for : Let . We can solve the system using back substitution.

  • From the second row: .
  • From the first row: .

The solution after one step is:

Task 6

a) Definition and Explanation of Consistency

Consistency for a one-step method means that the numerical scheme genuinely represents the differential equation in the limit as the step size approaches zero.

In other words for it answers the question “For an an infinitesimally small step, does the given method behave like the actual differential equation?”

This is measured with the local truncation error, , which is the error the method makes in a single step, assuming the starting point was perfectly accurate.

A method is consistent if this error vanishes as the step size shrinks to zero. The order of consistency, , tells us how fast the error disappears, with the error being proportional to .


b) Order of Consistency Calculation

Euler Method

The Euler method is defined by . [cite_start]The increment function is [cite: 589].

  1. Set up the truncation error formula:

  2. Use Taylor Series: We expand around :

  3. Substitute and Simplify:

    Since , the leading terms cancel:

The local truncation error is of the first order in . Therefore, the Euler method has an order of consistency of 1.

Euler-Heun Method

[cite_start]The Euler-Heun method’s increment function is [cite: 591].

  1. Set up the truncation error formula:

  2. Use Taylor Series for all terms:

    • Left Part: We expand to a higher order: . This gives:

    • Right Part: We use a multivariate Taylor expansion for the second term:

      So the full increment function is:

  3. Substitute and Simplify: Using and , the increment function becomes:

    Now, we substitute everything back into the truncation error formula:

The local truncation error is of the second order in . [cite_start]Therefore, the Euler-Heun method has an order of consistency of 2[cite: 645].