2
Christopher Johnson Calculus III Project – Matlab 3D Surfaces 4/20/15 OBJECTIVE Use Matlab and knowledge of derivatives to map a 3D surface and its tangent lines. METHOD 1) Given the following equation: ! !, ! = ! ! 2 ! ! + 25 8 at point P: (2,4, !" ! ) Find partial derivatives with respect to x & y, which gives the slope in each respective direction. ! ! !, ! = ! ; ! ! !, ! = 2! This gives the slopes in each direction. ! ! 2,4 = 2 ; ! ! 2,4 = 4 2) Use Matlab code to define variables (x,y) with their domain and range, solve for function and its derivatives, equations for lines in x & y, create a for loop using the above equation, and finally use the plot and surf commands to create a 3D surface of the function and its directional slopes in separate colors for visibility.

Calc III Project

Embed Size (px)

DESCRIPTION

Calc III Project

Citation preview

Page 1: Calc III Project

Christopher  Johnson  Calculus  III    

Project  –  Matlab  3-­‐D  Surfaces  4/20/15  

OBJECTIVE    Use  Matlab  and  knowledge  of  derivatives  to  map  a  3-­‐D  surface  and  its  tangent  lines.    METHOD    1)     Given  the  following  equation:    

! !,! = −!!

2 − !! +258  

         at  point  P:  (2,4,− !"

!)  

 Find  partial  derivatives  with  respect  to  x  &  y,  which  gives  the  slope  in  each  respective  direction.      !! !,! = −!  ;  !! !,! = −2!  

 This  gives  the  slopes  in  each  direction.      !! 2,4 = −2  ;  !! 2,4 = −4  

 2)       Use  Matlab  code  to  define  variables  (x,y)  with  their  domain  and  range,  solve  

for  function  and  its  derivatives,  equations  for  lines  in  x  &  y,  create  a  for  loop       using  the  above  equation,  and  finally  use  the  plot  and  surf  commands  to       create  a  3-­‐D  surface  of  the  function  and  its  directional  slopes  in  separate       colors  for  visibility.    

   

Page 2: Calc III Project

CONCLUSIONS    Mapping  a  3-­‐D  surface  function  and  its  tangent  lines  at  a  point  using  Matlab  gives  a  powerful  visual  tool  to  understand  how  derivatives  work  with  regards  to  a  volume.    The  bounds  can  be  easily  changed,  or  different  functions  can  be  evaluated  and  graphed  using  similar  code.    This  is  what  a  3-­‐D  graphing  utility  typically  does  for  the  user  when  it  is  given  a  function,  it  solves  for  the  function  at  all  the  different  points.    By  emphasizing  the  tangent  lines,  it  is  easier  to  understand  how  the  surface  is  behaving  at  exactly  that  point  in  terms  of  its  slope  in  x  and  y.