Problem 1
- Develop a function MySinh which computes the function
You may use the built-in function exp to evaluate ex when |x| is sufficiently large, but you must rewrite f to avoid the subtractive cancellation at when x 0.
- 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 1015 on the interval [3,3].
Problem 2
- Develop a function MyNewtonSqrt which uses Newtons method for computing square roots subject. Your function must use the initial guess
for s when s [1,4].
- 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
- Develop a function MyLog which uses Newtons method to solve the non-linear equation f(x) = 0 where f(x) = exp(x) and > 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].
- 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
- Copy the script scripts/l4p4.m into the function work/MyRobustSecant.m and complete the function according to the specification.
- 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.