Description
Contents
1 The time and the place 1
2 The problems 1
1 The time and the place
The lab session will take place on
2 The problems
It is a smashing idea to check the folder lab4/scripts carefully!
Problem 1
1. Develop a function MySinh which computes the function
.
2. Develop a minimal working example MySinhMWE which compares your implementation to the built-in function sinh. It is possible to reduce the relative error below 10−15 on the interval [−3,3].
Problem 2
1. Develop a function MyNewtonSqrt which uses Newton’s method for computing square roots subject. Your function must use the initial guess
√
for s when s ∈ [1,4].
2. Develop a minimal working example MyNewtonSqrtMWE1 which compares your implementation to the built in function sqrt. It is possible to reduce the relative error to 2u on the interval [10
Problem 3
1. Develop a function MyLog which uses Newton’s method to solve the non-linear equation f(x) = 0 where f(x) = exp(x) − α and α > 0. Your function must exploit the fact that if α = f · 2e, then
log(α) = log(f) + elog(2)
Your are free to use the special function log2 to determine f and e. You are free to use the built-in value of log(2). Your function must use the initial guess
for log(s) when s ∈ [1,2].
2. Develop a minimal working example MyLogMWE which compares your implementation to the built-in function log. It is possible to reduce the relative error below 2u on the interval [2,10].
Problem 4
1. Copy the script scripts/l4p4.m into the function work/MyRobustSecant.m and complete the function according to the specification.
2. Develop a minimal working example MyRobustSecantMWE which solves the your favorite non-linear equation. I recommend computing a firing solution.
Reviews
There are no reviews yet.