Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu Engr/Math/Physics 25 Chp11: MuPAD Misc Bruce Mayer, PE Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu
Using Greek Letters Can only do ONE letter at time Some Letters do NOT have conversions Spaces do NOT Convert Select ONLY letters; NOT letters and a space Can only do ONE letter at time Not ALL std Ltrs convert to Greek Also Use Ctrl+G
TypeSetting Symbols
Greek from Command Bar Make Expression Use Assignment Operator → := Now type A*cos( *t+ ) Next Pick-off the Greek from the COMMAND BAR Click the Down Arrow
Greek from Command Bar Then pick off omega & phi from the pull-down list with cursor in the right spot in the “h” expression Then hit Enter to create symbolic expression Some Other Expressions with Greek Pulled From the Command Bar
“HashTag” PlaceHolders PlaceHolder for items from the Command Bar look Something like: #f, or #x Sort of Like “HashTag” in Twitter Let take an Anti-Derviative, and Calculate some Integrals Use the Command Bar Integral Pull-Down Pick first one to expose Place Holders for fcn & var
“HashTag” PlaceHolders Replace“HashTags” For Variable End-Point Definite Integral The HastTags The symbolic Definite Integral The NUMERIC Definite Integral(s)
Assignment vs. Procedure := does NOT Create a function It assigns a complex expression to an Abbreviation To Create A Function (MuPad “Procedure”) include characters -> Comparing →
Quick Plot by Command Bar Find Plot Icon Then Fill in the HashTag the the desired Function; say The Template The Result after filling in HashTag
Adjust Plot MuPad picks the InDep Var limits ±5 Write out Function to set other limits 2X-Clik the Plot to Fine Tune Plot formatting Using the Object Browser
Object Brower (2X Clik Plot)
delete → early & often In MuPAD there is NO WorkSpace Browser to see if a variable has been evaluated and currently contains a value Use “delete(p)”, where “p” is the variable to be cleared in a manner similar to using “clear” in MATLAB When in Doubt, DELETE if ReUsing a variable symbol
delete → early & often BOOBY PRIZE → A Variable defined in one WorkBook will CARRY OVER into OTHER WorkBooks The Deleted Assignment in the original WorkBook can be Recovered by using Evaluate When in doubt → DELETE See File: Multiple_Assigns_Deletions_1204
TYU 11.2-1 For a A very Good Exercise See file ENGR25_TYU11_2_1_Expressions_Functions_1204.mn
TYU11.3 Another Good Exercise ENGR25_TYU11_3_Expressions_Functions_1204.mn
Inserting Images into MuPAD Unlike the MATLAB Command Window, IMAGES can be imported into Text Regions of a MuPAD WorkBook Use Menu Path: Insert→Image See File Insert-Graphic_into_MuPAD_1608.mn Contains some other “tips” on MuPAD as well
TYU11.5 → Derivatives Take Some Derivatives ENGR25_TYU11_5_Derivatives_1204.mn
TYU11.5 → AntiDerivatives Do Some Integration ENGR25_TYU11_5_Integration_1612.mn
Power Series General Power Series: Power Series Convergence Behavior A form of a GENERALIZED POLYNOMIAL Power Series Convergence Behavior Exclusively ONE of the following holds True Converges ONLY for x = 0 (Trivial Case) Converges for ALL x Has a Finite “Radius of Convergence”, R
Functions as Power Series Many Functions can be represented as Infinitely Long PolyNomials Consider this Function and Domain The Geometric Series form of f(x) Thus
Taylor Series Consider some general Function, f(x), that might be Represented by a Power Series Thus need to find all CoEfficients, an, such that the Power Series Converges to f(x) over some interval. Stated Mathematically Need an so that:
Taylor Series If x = 0 and if f(0) is KNOWN then a0 done, 1→∞ to go…. Next Differentiate Term-by-Term Now if the First Derivative (the Slope) is KNOWN when x = 0, then
Taylor Series Again Differentiate Term-by-Term Now if the 2nd Derivative (the Curvature) is KNOWN when x = 0, then
Taylor Series Another Differentiation Again if the 3rd Derivative is KNOWN at x = 0 Recognizing the Pattern:
Taylor Series Thus to Construct a Taylor (Power) Series about an interval “Centered” at x = 0 for the Function f(x) Find the Values of ALL the Derivatives of f(x) when x = 0 Calculate the Values of the Taylor Series CoEfficients by Finally Construct the Power Series from the CoEfficients
Example Taylor Series for ln(e+x) Calculate the Derivatives Find the Values of the Derivatives at 0
Example Taylor Series for ln(e+x) Generally Then the CoEfficients The 1st four CoEfficients
Example Taylor Series for ln(e+x) Then the Taylor Series
Taylor Series at x ≠ 0 The Taylor Series “Expansion” can Occur at “Center” Values other than 0 Consider a function stated in a series centered at b, that is: Now the Radius of Convergence for the function is the SAME as the Zero Case:
Taylor Series at x ≠ 0 To find the CoEfficients need (x−b) = 0 which requires x = b, Then the CoEfficient Expression The expansion about non-zero centers is useful for functions (or the derivatives) that are NOT DEFINED when x=0 For Example ln(x) can NOT be expanded about zero, but it can be about, say, 2
Example Expand x½ about 4 Expand about b = 4: The 1st four Taylor CoEfficients
Example Expand x½ about 4 SOLUTION: Use the CoEfficients to Construct the Taylor Series centered at b = 4
Example Expand x½ about 4 Use the Taylor Series centered at b = 4 to Find the Square Root of 3
Expand About b=1, ln(x)/1 Da1 := diff(ln(x)/x, x) Db2 := diff(Da1, x) Dc3 := diff(Db2, x) Dd4 := diff(Dc3, x) ReCall that ln(1) = 0
Expand About b=1, ln(x)/1 ln(x)/x, x f0 := taylor(ln(x)/x, x = 1, 0)
Expand About b=1, ln(x)/1 f3 := taylor(ln(x)/x, x = 1, 3) d6 := diff(ln(x)/x, x $ 5)
Expand About b=1, ln(x)/1 plot(f0, f1, f2, f3, f4, f5, x =0.5..3, GridVisible = TRUE, LineWidth = 0.04*unit::inch, Width = 320*unit::mm, Height = 180*unit::mm, AxesTitleFont = ["sans-serif", 24], TicksLabelFont=["sans-serif", 16])
TYU 11.5 → Sums & Series Exercise Taylor’s Series & Sums ENGR25_TYU11_5_6789_Taylor_Sums_Limits_1204.mn
TYU11.6 → ODEs Do an ODE Solution file = ENGR25_TYU11_6_ODE_1204.mn By: File → Export → PDF
All Done for Today It’s All GREEK to me… 8.[35,116,107]