CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011.

Slides:



Advertisements
Similar presentations
ESSENTIAL CALCULUS CH11 Partial derivatives
Advertisements

CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2012.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2010.
Chapter 18 Interpolation The Islamic University of Gaza
Clicker Question 1 (0, 1) is a critical point for the function f (x ) = x 4 – 4x This point is a A. local maximum B. local minimum C. neither.
Tables of Integrals and Computer Software for Integrals (9/19/08) Because finding antiderivatives is often a tricky and time-consuming job, – Tables of.
Clicker Question 1 What is an equation of the tangent line to the curve f (x ) = x 2 at the point (1, 1)? A. y = 2x B. y = 2 C. y = 2x 2 D. y = 2x + 1.
Calculus With Tech I Instructor: Dr. Chekad Sarami.
CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2010.
Monday, 5/10Tuesday, 5/11Wednesday, 5/12Thursday, 5/13Friday, 5/14 Graphing & Properties of Quadratic Functions HW#1 Graphing & Properties of Quadratic.
CHAPTER 3 SECTION 3.7 OPTIMIZATION PROBLEMS. Applying Our Concepts We know about max and min … Now how can we use those principles?
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University October 6-10, 2008 ©By the author. All rights reserved.
CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and.
Ordinary Differential Equations
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
APPLICATION OF DIFFERENTIATION AND INTEGRATION
Dr. Hisham Abdelbaki Managerial Economics 1 ECON 340 Review of Mathematical Concepts.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS 121 Engineering Computation Lab Lab 4 Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission is.
CSE 3802 / ECE 3431 Numerical Methods in Scientific Computation
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 122 / CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Summer, 2009 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 123 Engineering Computation Lab Lab 2 Dan De Sousa and Bruce Char Department of Computer Science Drexel University April 2009 ©By the author. All rights.
CDAE Class 3 Sept. 5 Last class: 1.Introduction Class exercise 1 Today: Results of class exercise 1 1. Introduction Class exercise 2 Next class:
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS122/CS123 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Summer 2011.
CS122 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS 123 Lab 4 Instructor: Mark Boady Course Designer: Professor Bruce Char Department of Computer Science Drexel University Spring 2013.
CS122 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS122 / CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2010.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 1 Section Instructor: Mark Boady Content By: Bruce Char Department of Computer.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2012.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Winter, 2011 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
Optimization Problems
CS123 Engineering Computation Lab Lab 2 Instructor: Mark Boady Content By: Bruce Char Department of Computer Science Drexel University.
MTH 251 – Differential Calculus Chapter 4 – Applications of Derivatives Section 4.6 Applied Optimization Copyright © 2010 by Ron Wallace, all rights reserved.
1 Chapter 1 Introduction to Differential Equations 1.1 Introduction The mathematical formulation problems in engineering and science usually leads to equations.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2013.
Clicker Question 1 What is the area enclosed by f(x) = 3x – x 2 and g(x) = x ? – A. 2/3 – B. 2 – C. 9/2 – D. 4/3 – E. 3.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
Project NExT CAS Panel Session University of Wisconsin, Madison July 30, 2008 Mathematica in the Military: Using CAS tools at the United States Military.
CS122 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS122 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Winter 2010.
CS 121 Engineering Computation Lab Lab 4 Department of Computer Science Drexel University February 16-20, 2008 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Spring 2013.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2011.
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2012.
CS 122 Engineering Computation Lab Lab1 Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission.
CS 122/CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
CS122 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Winter 2013.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS122 Engineering Computation Lab Lab 4
CS 121 Engineering Computation Lab Lab 3
CS 121 Engineering Computation Lab Lab 2
CS123 Engineering Computation Lab Lab 4
The Method of Least-Squares
CS122 Engineering Computation Lab Lab 3
Ordinary Differential Equation
SKTN 2393 Numerical Methods for Nuclear Engineers
Presentation transcript:

CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011

Lab 3 Overview Based on materials from Chapters 19 and 20 –Chapter 19 – Calculus and Optimization Develop an objective function for the minimum surface area of a can and find optimal dimensions (radius and height) using Maple’s Optimization feature –Chapter 20 – more Maple support for mathematical modeling Solving integration problems – finding the surface area of an irregularly shaped object Piecewise expressions – irregularly shaped curve consisting of a series of “piecewise” expressions Curve fitting using Splines – generating spline curves of various degrees to connect a series of data points

Lab 3 Overview Lab 3 outline –Part 0 – practice with Maple mechanics for Optimization, piecewise expressions, integration and differentiation, Spline curve fitting –Part 1 – Find the minimum dimensions of a can that holds a specified volume of liquid using Maple’s Optimization function Create an expression for the can’s surface area (objective function) to hold a constant volume of liquid Use the Maple Optimization function to find the minimum dimensions (radius and height) for the surface area –Part 2 – finding the surface area of an irregularly shaped machine part Define top of object in terms of a series of piecewise expressions Bottom = a single expression Plot top, bottom expressions  shape of object Integrate (top – bottom)  area between curves

Lab 3 Overview Lab 3 outline –Part 3 – Spline curve fitting to analyze the power of a baseball bat swing Given a table of times (seconds) versus power (hp), create and plot spline curves of degrees 1 through 4 Answer 4 questions using the results of the spline plots –Notes: –B. total energy transferred is the integral of the power curve –C. point of maximum power increase – take derivative of power curve and then find maximum (optimization)

Lab 3 Overview New lab description format for Lab 3 –Basic lab description document in form of a shell, directing you to starter scripts for each of 4 parts (Part 0, 1, 2 and 3) –Each starter script consists of text directions for completing that Part –Maple statements and results to be generated at various points within starter scripts Mix of text and math modes

Lab 3 Maple Concepts: Discussion and Demo Part 1 – Maple’s Optimization feature –Creating the Objective function (surface area of a can) Surface area = lateral area + top and bottom SA = 2*pi*r*h + 2*pi*rsquared –Since the surface area needs to be a function of a single variable (eg. radius=r), we need to find an function relating h (height) to r and substitute. Since the volume is constant at 1000: 1000 = pi*rsquared*h  h = 1000 / (pi*rsquared) Substitute this equation for h into the SA equation above to obtain the objective function SA(r).

Lab 3 Maple Concepts: Discussion and Demo Part 1 – Maple’s Optimization feature - continued –Now use this objective expression SA(r) to find the minimum surface area over a range of radii that holds a volume = 1000 –minRslt:=Optimization[ Minimize](objexpression,r=1..10) You will obtain 2 results minRslt[1]  minimum surface area minRslt[2]  radius that produces this minimum SA –Substitute minRslt[2] into the equation for h to obtain the associated height –Note Optimize[Minimize](objexp,x=a..b) → produces set of approximate results Minimize(objexp,a=a..b, location) → produces set of exact results

Lab 3 Maple Concepts: Discussion and Demo Part 2 – Area between 2 curves –Piecewise expressions Use clickable interface as opposed to textual I/F To add more than 2 piecewise expressions –Ctrl-Shift-R (PC) (Command=Shift-R for Mac) –Be sure to highlight each area and type over it –(not as “free-form” as you would like) – see demo –“otherwise” condition – can use to denote all other values not defined in piecewise expressions Be sure to assign the piecewise expression a name → top := “piecewise expression” –Integration Indefinite integral  int(f(x),x)  generates function in terms of x Definite integral  int(f(x),x=a..b)  numeric result –Differentiation → result := diff(somefunction, x);

Lab 3 Maple Concepts: Discussion and Demo Problem 3 – analysis of batter’s swing Plot_structure:=CurveFitting[Spline](x values, y values, name for independent variable, degree=degree of Spline fit) Or, can use with(CurveFitting); Spline( ); –Ex. CurveFitting[Spline](T,p,t,degree=3) Will produce a Spline curve fit using cubic piecewise expressions –Some Spline details Curve passes through all points (note that linear least squares curve fit produces a “best straight line estimate” for all points, and may possibly not pass through any point) A piecewise expression will be generated to connect each pair of adjacent points

Lab 3 – Maple Part0 Exercises 1. Maple optimization logistics 2. Piecewise expression and integration 3. More on integration and differentiation 4. Curve fitting with Splines

Quiz Week (7) Activities Quiz 1 will be released on Friday (5/6) at 6 PM –Deadline: Wednesday (5/11) at 4:30 PM –Makeup quiz – from Thursday (5/12) at 9 AM through Sunday (5/15) at 11:00 PM 30% penalty Pre-lab 3 quizlet –From Thursday (5/12 – noon) through Monday (5/16 – 8 AM) Be sure to visit the CLC for quiz or general Maple assistance