Question: ( Strange behavior of a continuous function: LM 3 . 1 - 2 5 ) Consider the function f ( x ) = { e

(Strange behavior of a continuous function: LM 3.1-25) Consider the function
f(x)={ex-1xifx01ifx=0
This is a continuous function for all xinR, but numerically it has difficulties when x~~0.
(a) Check this yourself by letting x=10-k for k=1,2,dots,15. Generate a nice table using
either disp or fprintf. Do it without using any loop.
(b) Repeat the previous part but rewrite f(x) as
f2(x)={ex-1logexifx01ifx=0
which was proposed by Bill Kahan. Leave the denominator as logex- do not convert
it to x. Do it without using any loop.
(c) Summarize the results of the two parts into a single table. The table should have three
columns with the first being x, the second being f(x), and the last being f2(x). Use
format long g for your output if using disp; use a compatible format specification
if using fprintf. Do it without using any loop.
Note. Write your code inside a single code block for each part. You do not need to write a
function for this problem.
 (Strange behavior of a continuous function: LM 3.1-25) Consider the function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!