### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# MATH OF ENGR ME 17

UCSB

GPA 3.94

### View Full Document

## 15

## 0

## Popular in Course

## Popular in Mechanical Engineering

This 12 page Class Notes was uploaded by Daren Beatty Jr. on Thursday October 22, 2015. The Class Notes belongs to ME 17 at University of California Santa Barbara taught by Staff in Fall. Since its upload, it has received 15 views. For similar materials see /class/227083/me-17-university-of-california-santa-barbara in Mechanical Engineering at University of California Santa Barbara.

## Reviews for MATH OF ENGR

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/22/15

FUNCT IONS Syntax function outvarName70f7Functionparameterl parameter2 parameterN Comments that explain what the function is doing and how to use it It is usual to give a description of the input and output These comments will be displayed when typing 39help NameiofiFunction39 at the command prompt The very first line is called the H1 line and is the line that is searched by the 39lookfor39 command It is usual to give a short desciption of the overall goal of the function Finally note that these comments must be in one block o0 o0 o0 o0 o0 o0 o0 Statements ie the main part of the code that instructs the computer what to do The goal of the statements is to compute or assign the output variable ie 39outvar39 One can add comments here as well to explain the different parts of the code but these comments will not be displayed when invoking 39help Name Of Function39 at the command prompt Rather they help the program to be readable and quickly understandable end As always one needs to save this function in the file 39NameiofiFunctionm39 Example function vfreefallvelocitymcdt freefallvelocity Bungee velocity as a function of mass coefficient cd and time t m drag o0 o0 Input m mass kg cd drag coefficient kgm t time Output v downward velocity ms o0 This line and the following comments are not invoked when typing 39help freefallvelocityicomments39 oo g981 r ty vsqrtgmcdtanhsqrtcdgmt formula for the velocity end 0 Call the function like this gtgt velocityfreefallvelocity6025lO Note In this call all the m will be replaced by 60 all the cd will be replaced by 25 and all the t will be replaced by 10 Then MATLAB creates a variable called velocity and in it put the result called v in the function The output is gtgt cX 79013x1021x2 005x1 m2 0016X2 m2 0007x1 x2 gtgt Xfval fminsearchc 00 X 085368944970842 637578748109051 fval 862494446205611 727 The solution can be developed in MATLAB as F 1709 atx 06364 gtgt F X 14pi60CIQX X02a020 32 gtgt XFXfminsearchF05 X 063642578125000 FX 170910974594861 728 This is a trick question Because of the presence of l 7 s in the denominator the function will experience a division by zero at the maximum This can be recti ed by merely canceling the l 7 s terms in the numerator and denominator to give 15s T 2 4s 3s 4 Any of the optimizers described in this section can then be used to determine that the maximum ofT3 occurs ats 1 gtgt format long gtgt T s lSS4SA2 3s4 gtgt sminTminfminbndT04 smin 099998407348199 Tmin 299999999939122 729 a The fminbnd function can be used to determine the solution as gtgt format long gtgt D V 0 01 0 6 VA20 950 6 16000V A2 gtgt VminDminfminbnd D 0 1200 Vmin 5 098181181932037e002 Dmin 3 118974190338869e003 The approach can be implemented to evaluate other values of Wwith a constant ato yield the following results W V D 12000 4415154 2339231 13000 4595438 2534167 PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual ma be displa ed reproduced or distributed in an form or b an means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If on are a student using this Manual on are using it without permission 14000 4768912 2729102 15000 4936293 2924038 16000 5098181 3118974 17000 5255085 3313910 18000 5407438 3508846 19000 5555614 3703782 20000 5699940 3898718 The optimal velocity along with the minimal drag can be plotted versus weight As shown below the relationship is fairly linear for the speci ed range 600 5000 V 500 4000 D 400 3000 300 200 2000 100 1000 0 l r l 1 0 12000 14000 16000 18000 20000 730 A tool such as the Excel Solver can be used to determine the solution as gtgt format long gtgt fxx O4sqrt1x 2 sqrt1x 21 O41XA2X gtgt Xffminbndfx02 X 105185912272736 f 70 15172444148082 731 The potential energy function can be written as PE 0512x12 0512x1 7x92 inz Contour and surface plots can be generated with the following script ka20kb15F100 X1inspace01020y1inspace02040 X1X2 meshgridxy ZO5kax1A2O5kbX2 X1A2 FX2 subp10t121 cscontourx1x2Zc1abelcs X1abel39x139y1abel39x239 title39a Contour p10t39grid subp10t122 cssurfcx1x2Z zminfloor minZ zmaXceil max Z PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual ma be displa ed reproduced or distributed in an form or an means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If ou are a student using this Manual ou are using it without permission y versus x 39x versus y o t t t t t t t l t t t t t t t t l 0 5 10 15 20 Thus the best t lines and the standard errors differ This makes sense because different errors are being minimized depending on our choice of the dependent ordinate and independent abscissa variables In contrast the correlation coef cients are identical since the same amount of uncertainty is explained regardless of how the points are plotted 136 Linear regression with a zero intercept gives note that T K T C 27315 15000 10000 y29728x 5000 R2 09999 Ot l l l l l 0 100 200 300 400 500 Thus the fit is p 29728T Using the ideal gas law R 2 E K T n For our t 3229728 T For nitrogen n 7 lkg 28 gmole PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual ma be displa ed reproduced or distributed in an form or b an means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If on are a student using this Manual on are using it without permission Therefore R 2 29728 103 28 j 8324 This is close to the standard value of 8314 Jgmole 137 The function can be linearized by dividing it by x and taking the natural logarithm to yield 111yx 2111054 AX Therefore if the model holds a plot of lnyx versus x should yield a straight line with an intercept of lnm and a slope of l x Z In Zx 01 075 2014903 02 125 1832581 04 145 1287854 06 125 0733969 09 085 005716 13 055 08602 15 035 145529 17 028 180359 18 018 230259 3 y 24733x 22682 2 R2 09974 1 o 1 2 3 1 1 1 1 1 o o 5 1 1 5 2 Therefore 34 24733 and 054 e226 9661786 and the t is y 9661786xe 733quot This equation can be plotted together with the data PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual ma be displa ed reproduced or distributed in an form or b an means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If on are a student using this Manual on are using it without permission 037 logA 03799logW 03821 036 2 R 09711 035 034 033 032 39 1 8 184 188 192 196 Therefore the power is b 03799 and the lead coef cient is a 10 0 38 04149 and the t is A 04149W03799 Here is a plot of the t along with the original data 235 23 225 22 215 21 205 1 1 1 1 1 70 75 80 85 90 The value of the surface area for a 95 kg person can be estimated as A 2 041499303799 2 234 m2 1312 A power t can be determined by taking the common logarithm of the data Mass Metabolism Animal kg watts logMass ogMet Cow 400 270 26021 24314 Human 70 82 18451 19138 Sheep 45 50 16532 16990 Hen 2 48 03010 06812 Rat 03 145 05229 01614 Dove 016 097 07959 00132 Linear regression gives PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual ma be displa ed reproduced or distributed in an form or b an means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If ou are a student using this Manual ou are using it without permission 3 y 07266x 05301 R2 09932 Therefore the POWer is b 07266 and the lead coef cient is a 100 5301 3389 and the t is Metabolism 33891VIaSS 07266 Here is a plot of the t along with the original data 300 250 200 150 100 y 33893x0397266 2 50 R 09982 0 o 100 200 300 400 1313 We regress lny versus x to give lny 6303701 0818651x Therefore 051 66303701 5465909 and 31 0818651 and the exponential model is y 2 54659095303136 The model and the data can be plotted as PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual 39spla ed reproduced or distributed in an form or b an means without the prior written permission of the ma be d1 publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their ou are using it without permission individual course preparation If ou are a student using this Manual Q 01519120 08428 19067 d We can redo the regression but with a zero intercept 24 y01594x R208917 20 16 so so 100 110 120 130 140 150 Thus the model is Q 01594P where Q ow and P precipitation Now if there are no water losses the maximum ow Qm that could occur for a level of precipitation should be equal to the product of the annual precipitation and the drainage area This is expressed by the following equation Qm Alt1un2PE yr For an area of 1100 km2 and applying conversions so that the ow has units of m3s cm 106m2 lm 1 yr km2 100cm86400s365d Qm 1100 kmzPi yr Collecting terms gives Qm 0348808P Using the slope from the linear regression with zero intercept we can compute the fraction of the total ow that is lost to evaporation and other consumptive uses can be computed as 7 0348808 01594 0348808 F 0543 1326 First we can determine the stress 039 2347418 1065 PROPRIETARY MATERIAL The McGraw Hill Companies Inc All rights reserved No part of this Manual ma be displa ed reproduced or distributed in an form or b an means without the prior written permission of the publisher or used beyond the limited distribution to teachers and educators permitted by McGraw Hill for their individual course preparation If on are a student using this Manual on are using it without permission CURVE FITTING There are three main components to science and engineering Theory computer simulations and experiments In the case of experiments it is necessary to be able to interpret the data and to extract useful information Curve tting is a very powerful tool in that it allows finding the relationships between variables For example properly fitting the data of experiments measuring the drag force on an object as a function of wind velocity can produce the very useful result that the drag is roughly a function of the velocity squared see figure 1 F 2741 x V9842 Drag versus Wind Velocity i i o 1400 7 12m 7 7 Interpolation o 7 1000 7 600 O 7 u a D 7 400 7 200 7 o 400 i i i i i i i i o 10 20 so 50 so 70 as so 40 Velocily Figure 1 Curve fitting for drag vs wind velocity The goal of curve fitting is therefore to develop some tools that can help approximate data points with useful functions The first useful function one can think of is a linear curve ie how to fit a straight line to data points Since the data may not be naturally aligned one needs to design a best fit For example figure 2 depicts a linear fit to the data relating the drag force to the wind velocity This is the best fit in the sense that the sum of the square of the error between the fit and the data is minimized This is called a least square fit Drag versus Wind Velocin Data Interpolation 40 50 Velocity Figure 2 Linear fit to the data drag vs wind velocity A similar mathematical construct exists for de ning quadratic best t or cubic best t etc The tools function in MATLAB is quite useful in this regard Tools Basic Fitting was used to produce the results in gure 3 In class Description of ToolsBasic Fitting Description of polyfit and polyval Drag versus Wind Velocity i i 1400 r I 39 r 0 Data 1200 7 linear O 7 quadratic cubic 100 4th degree 800 40 50 Velocity Figure 3 Different fitting curves for the same data However blind curve tting like those in gure 3 is not always useful For example in the case of the dragversusvelocity example we need to impose that the drag force be zero when the wind velocity is zero otherwise the t will have little physical meaning In this case trying a linear or a quadratic or a cubic t will not produce acceptable results since the intercepts will not be equal to zero in any of those cases A better approach is to use a transform that will convert the data into a more useable form This is called linearization in this case and there are three standard linearization strategies note that there exits other models but the following three are very informative 1 The exponential model 2 The power model 3 The saturationgrowthrate model X a y bx m It is useful to keep in mind the following when deciding which model to use In the case of the exponential model y is different from zero when x0 Therefore this model is not well suited for a case like the drag VS wind velocity relation For the other two models we have y0 when x0 but the difference between the two is that the saturationgrowthrate model levels off as x increases modeling a limiting condition of growth or decay The linearization is obtained in the following way Instead of expressing y as a function of x we express 1 lny as a function of x in the case of the exponential model 2 lny as a function of lnx in the case of the power model 3 1y as a function of 1x in the case of the saturationgrowthrate model In class Show the linearization Since the data is now linearized we can use a linear best fit to fit the transformed linearized data The slope and intercept of the transformed data are linked with the original models by l Slopeb and Interceptlna in the case of the exponential model 2 Slopeb and Interceptlna in the case of the power model 3 Slopeba and Intercept1a in the case of the saturationgrowthrate model From these relations one can find the coefficients a and b in the case of all three models

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

#### "Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

#### "Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.