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 9: Functional Linearity

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.

Beginning Explorations or Computer Experiments

Hint 9.2

The main part of this project is for you to make the connections between symbolic increments and graphical ones.  The help below is only with graphics options.

\(Clear[f, x, m, b]; 
f[x_] := \ m\ x\  + \ b\)

Various b's

\(m\  = \ 2/3; 
b\  = \ Table[u, {u, \(-2\), 3, 1}]; 

    Plot[Evaluate[f[x]], {x, \(-2\), 3}, AxesLabel -> {"x", "f[x]"}, 
      AspectRatio -> Automatic, 
      PlotStyle -> Table[Hue[u], {u,  .4, 1,  .2}]]; 
f[x]\)

Various m's

\(b\  = \ 2/3; 
m\  = \ Table[u, {u, \(-2\), 3, 1}]; 

    Plot[Evaluate[f[x]], {x, \(-2\), 3}, AxesLabel -> {"x", "f[x]"}, 
      AspectRatio -> Automatic, 
      PlotStyle -> Table[Hue[u], {u,  .4, 1,  .2}]]; 
f[x]\)

Marked Points

\(Clear[x, m, b]; 
b\  = \ 3/4; 
m\  = \ 1/2; 

    curve = Plot[Evaluate[f[x]], {x, \(-2\), 3}, 
        AxesLabel -> {"x", "f[x]"}, AspectRatio -> Automatic, 
        PlotStyle -> RGBColor[1, 0, 0], Ticks -> None, 
        DisplayFunction -> Identity]; 
x = 2/5; 

    Δx\  = \ 4/3; 

    point\  = \ 
      Graphics[{AbsolutePointSize[3], Point[{x, f[x]}], 
          Point[{x + Δx, f[x + Δx]}]}]; 

    point\  = \ 
      Show[point, 
		
        Graphics[
          Line[{{x, f[x]}, {x + Δx, f[x]}, {
                x + Δx, f[x + Δx]}}]], 
        Graphics[Text["(x,f[x])", {x +  .1, f[x] +  .3}]], 
		
        Graphics[
          Text["(x+Δx,f[x+Δx])", {
              x + Δx +  .3, f[x + Δx] +  .3}]], 

        		Graphics[
          Text["Δx", {x + Δx/2, 
              f[x] -  .2}]], 
		
        Graphics[
          Text["Δy=f[x+Δx]-f[x]", {
              x + Δx + 1, 
              \((f[x + Δx] + f[x])\)/2}]], 
							
        DisplayFunction -> Identity]; 

    Print[\*""((f[x + Δx] - f[x])/Δ)x="", 
      \(f[x + Δx] - f[x]\)\/Δx]; 

    Clear[x, Δx]; 

    Show[curve, point, DisplayFunction -> $DisplayFunction]; 

    Print["f[x]=", f[x]]; \)

Hints 9.4 & 9.5

This part of the project is intended to be paper and pencil math.  However, following are the relevent Mathematica computations.

Nonlinearity of Symbolic Increments and Approximate Linearity

f[x] = m x + b

\(Clear[f, x, Δx, m, b]; 
f[x_] = m\ x\  + \ b\)Simplify[f[x + Δx] - f[x]]Simplify[(((f[x + Δx] - f[x]))/Δ)x]f'[x]Simplify[
      (((f[x + Δx] - f[x]))/Δ)x - f'[x]]

f[x] = a (x^2)

\(Clear[f, x, Δx, a]; 
f[x_] = a\ x\^2\)Simplify[f[x + Δx] - f[x]]Simplify[(((f[x + Δx] - f[x]))/Δ)x]f'[x]Simplify[
      (((f[x + Δx] - f[x]))/Δ)x - f'[x]]

\(a\  = \ 1/3; 

    curve = Plot[Evaluate[f[x]], {x, \(-2\), 3}, 
        AxesLabel -> {"x", "f[x]"}, AspectRatio -> Automatic, 
        PlotStyle -> RGBColor[1, 0, 0], Ticks -> None, 
        DisplayFunction -> Identity]; 
x = \(-2\)/5; 

    Δx\  = \ 4/3; 

    point\  = \ 
      Graphics[{AbsolutePointSize[3], Point[{x, f[x]}], 
          Point[{x + Δx, f[x + Δx]}]}]; 

    point\  = \ 
      Show[point, 
		
        Graphics[
          Line[{{x, f[x]}, {x + Δx, f[x]}, {
                x + Δx, f[x + Δx]}}]], 
        Graphics[
          Text[\*""(\!\(x\_1\),f[\!\(x\_1\)])"", {x +  .1, 
              f[x] +  .3}]], 
		
        Graphics[
          Text[\*""(\!\(x\_2\),f[\!\(x\_2\)])"", {
              x + Δx +  .2, f[x + Δx] +  .2}]], 

        							DisplayFunction -> Identity]; 

    Print[\*""\!\(\(f[x\_2] - f[x\_1]\)\/Δx\)="", 
      \(f[x + Δx] - f[x]\)\/Δx]; 

    Clear[x, Δx]; 
x = 3/2; 
Δx\  = \ 1; 

    point\  = 
      Show[point, \ 
        Graphics[{AbsolutePointSize[3], Point[{x, f[x]}], 
            Point[{x + Δx, f[x + Δx]}]}, 
          DisplayFunction -> Identity]]; 

    point\  = \ 
      Show[point, 
		
        Graphics[
          Line[{{x, f[x]}, {x + Δx, f[x]}, {
                x + Δx, f[x + Δx]}}]], 
        Graphics[
          Text[\*""(\!\(x\_3\),f[\!\(x\_3\)])"", {x +  .1, 
              f[x] +  .3}]], 
		
        Graphics[
          Text[\*""(\!\(x\_4\),f[\!\(x\_4\)])"", {
              x + Δx +  .2, f[x + Δx] +  .2}]], 

        							DisplayFunction -> Identity]; 

    Print[\*""\!\(\(f[x\_4] - f[x\_3]\)\/Δx\)="", 
      \(f[x + Δx] - f[x]\)\/Δx]; 

    Clear[x, Δx]; 

    Show[curve, point, DisplayFunction -> $DisplayFunction]; 

    Print["f[x]=", f[x]]; \)

Beyond 9.5

f[x] = a (x^3)

\(Clear[f, x, Δx, a]; 
f[x_] = a\ x\^3\)Simplify[f[x + Δx] - f[x]]Simplify[(((f[x + Δx] - f[x]))/Δ)x]f'[x]Simplify[
      (((f[x + Δx] - f[x]))/Δ)x - f'[x]]

f[x] =  = a/x

\(Clear[f, x, Δx, a]; 
f[x_] = a\ x\^\(-1\)\)Simplify[f[x + Δx] - f[x]]Simplify[(((f[x + Δx] - f[x]))/Δ)x]f'[x]Simplify[
      (((f[x + Δx] - f[x]))/Δ)x - f'[x]]