Project Help Notebook by Keith Stroyan

Help NoteBook Copyright 1998 by Academic Press, Inc. - All rights reserved.
Modify this Notebook to prepare your project report.

Project 17: Numerical Approximation of Exponential Derivatives

by A. Student and B. Pupil

with technical help from Da LabMonitor and Help Notebook

My Project Introduction

Write this last.  Begin with the basic question and state your main finding clearly, but with few technical details.  You might even modify the title of this section to make it more interesting.

Hint 17.1

This NoteBook helps you work the project on direct computation of the derivatives of exponentials from the Mathematical Background Chapter on Exponentials and Logarithms.

The derivative of a  function  y[t]  comes from the differential approximation

y[t+dt]=y[t]+y'[t] dt+ε·dt,with  ε  small when  dt is small

Solving for  y'[t], we see that it is approximately

((y[t + dt] - y[t])/dt) ,  when  dt  is small

When  y [t] = (b^t),  this approximation can be re-written so that

y'[t] ≈((((b^dt) - 1))/dt) (b^t) ,  when  dt  is small.

y'[t] ≈((((b^dt) - 1))/dt) y[t] ,  when  dt  is small.

Thus we are interested in computing the term

(Subscript[k, b]) = 
        (lim_(Δt → 0)) 
          ((((b^Δ)t - 1)/Δ)t)≈ (((b^dt) - 1)/dt),  when  dt ≈ 0.

This should allow  dt  to be either small and positive or small and negative.  We tabulate a list values for this from smaller and smaller values of  dt, because numerical inaccuracies will eventually make the approximation inncaurate (because of the subtraction.)

Open the next cell, move the cursor there  and press <Enter> to estimate  (Subscript[k, 2]).  Then copy and modify the cell to estimate  (Subscript[k, 3]),  (Subscript[k, 2.7])  &  (Subscript[k, 2.8]).

Hint 17.2: Loop for successively smaller dt's in approximations to  d(b^t)/dt ,  first  b = 2

By laws of exponents and the microscope eqation   y'(t) = y(t)  k_b

\(b\  = \ 2.0\ ; 
    \  (*This\ is\ where\ you\ enter\ your\ base\ \ b\ \ for\ \ y\  = \ 
        \(b^t . \)*) 


    Print["Approximate derivative of  y = \!\(b\^t\), for b = ", b]; 

    Print["Approximations for k_b:"]; 

    Print["\!\(\(b\^dt - 1\)\/dt\)", "  ", " ", 
      "\!\(\(-\(\(b\^\(-dt\) - 1\)\/dt\)\)\)", "   ", "dt"]; 

    dt\  = \ 1.0; 

    Do[\ dt\  = \ dt/2\ ; 
\ \ \ 
      \(Print[\((b^dt\  - \ 1)\)/dt, " ", " ", 
          \((1\  - \ b^\((\(-dt\))\))\)/dt, "   ", dt];\)

      \ \ , {i, 1, 10}]; 
N[Log[b], 50]\)

Hint 17.3, 4: Symmetric Differences and Accuracy

When you have estimated  k_2,  k_3,  k_2.7  &  k_2.8, you will notice that they "bracket" the output  k_e = 1.  You will also notice some limitations in accuracy.  The last part of this exercise asks you to keep adjusting the value of  a  until you make the best possible approximation you can for the value of  a  that makes  k_a =1.

You might like to run the "Do - loop" longer.  If so, just replace  {i,1,10 } with a larger condition, such as  {i,1,40}.  Or even {i,1,100}.  How far can you go?

Much better accuracy can be obtained by averaging the positive dt and negative dt approximations to (Subscript[k, b]).  Show on pencil and paper that this gives the approximation

(((b^((dt/2))) - (b^(-(dt/2))))/dt)

If you can show it, you can use it to improve your accuracy.  (Just change the appropriate  Print statements, one for the header and one for the computation inside the loop.)

b = 2 ;
dt = 2^(-10) ;
N[(b^(dt/2) - b^(-dt/2))/(dt),10]

N[(b^(dt) - 1)/(dt),10]

N[Log[b],50]

Hint 17.5:  b = e is the base for (b^t) with  (Subscript[k, b]) = 1

Complete this program and run it with values of  b  until you get the best approximation you can for the  b  that makes  (Subscript[k, b]) = 1

\(b\  = \ 2.7\ ; 
    \  (*This\ is\ where\ you\ enter\ your\ base\ \ \(b . \)*) 


    Print[\*""Approximate derivative of  y = \!\(b\^t\), for b ="", b]; 
    
Print["Approximations for k_b:"]; 

    Print[\*""\!\(\(b\^\(dt\/2\) - b\^\(-\(dt\/2\)\)\)\/dt\)"", 
      "        ", "dt"]; 
dt\  = \ 1.0; 

    \(Do[\ dt\  = \ dt/2\ ; 

\ \ \ \ 
      Print[\ ?? ???\ ,"\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ",dt];
          
\ \ \ \ 
\ \ \ , {i, 1, 10}]; 
\ \ \ 
N[Log[b], 50]\)\)

Hint 17.6

sIN[degrees] = Sin[((π degrees)/180)]D[sIN[degrees], degrees]