Symbolic math toolbox: user's guide

Download Symbolic math toolbox: user's guide

Post on 02-Jan-2017

261 views

Category:

Documents

33 download

Embed Size (px)

TRANSCRIPT

  • Symbolic Math Toolbox

    User's Guide

    R2017b

  • How to Contact MathWorks

    Latest news: www.mathworks.com

    Sales and services: www.mathworks.com/sales_and_services

    User community: www.mathworks.com/matlabcentral

    Technical support: www.mathworks.com/support/contact_us

    Phone: 508-647-7000

    The MathWorks, Inc.3 Apple Hill DriveNatick, MA 01760-2098

    Symbolic Math Toolbox User's Guide COPYRIGHT 19932017 by The MathWorks, Inc.The software described in this document is furnished under a license agreement. The software may beused or copied only under the terms of the license agreement. No part of this manual may be photocopiedor reproduced in any form without prior written consent from The MathWorks, Inc.FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentationby, for, or through the federal government of the United States. By accepting delivery of the Program orDocumentation, the government hereby agrees that this software or documentation qualifies ascommercial computer software or commercial computer software documentation as such terms are used ordefined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms andconditions of this Agreement and only those rights specified in this Agreement, shall pertain to and governthe use, modification, reproduction, release, performance, display, and disclosure of the Program andDocumentation by the federal government (or other entity acquiring for or through the federalgovernment) and shall supersede any conflicting contractual terms or conditions. If this License fails tomeet the government's needs or is inconsistent in any respect with federal procurement law, thegovernment agrees to return the Program and Documentation, unused, to The MathWorks, Inc.Trademarks

    MATLAB and Simulink are registered trademarks of The MathWorks, Inc. Seewww.mathworks.com/trademarks for a list of additional trademarks. Other product or brandnames may be trademarks or registered trademarks of their respective holders.Patents

    MathWorks products are protected by one or more U.S. patents. Please seewww.mathworks.com/patents for more information.

    https://www.mathworks.comhttps://www.mathworks.com/sales_and_serviceshttps://www.mathworks.com/matlabcentralhttps://www.mathworks.com/support/contact_ushttp://www.mathworks.com/trademarkshttp://www.mathworks.com/patents

  • Revision HistoryAugust 1993 First printingOctober 1994 Second printingMay 1997 Third printing Revised for Version 2May 2000 Fourth printing Minor changesJune 2001 Fifth printing Minor changesJuly 2002 Online only Revised for Version 2.1.3 (Release 13)October 2002 Online only Revised for Version 3.0.1December 2002 Sixth printingJune 2004 Seventh printing Revised for Version 3.1 (Release 14)October 2004 Online only Revised for Version 3.1.1 (Release 14SP1)March 2005 Online only Revised for Version 3.1.2 (Release 14SP2)September 2005 Online only Revised for Version 3.1.3 (Release 14SP3)March 2006 Online only Revised for Version 3.1.4 (Release 2006a)September 2006 Online only Revised for Version 3.1.5 (Release 2006b)March 2007 Online only Revised for Version 3.2 (Release 2007a)September 2007 Online only Revised for Version 3.2.2 (Release 2007b)March 2008 Online only Revised for Version 3.2.3 (Release 2008a)October 2008 Online only Revised for Version 5.0 (Release 2008a+)October 2008 Online only Revised for Version 5.1 (Release 2008b)November 2008 Online only Revised for Version 4.9 (Release 2007b+)March 2009 Online only Revised for Version 5.2 (Release 2009a)September 2009 Online only Revised for Version 5.3 (Release 2009b)March 2010 Online only Revised for Version 5.4 (Release 2010a)September 2010 Online only Revised for Version 5.5 (Release 2010b)April 2011 Online only Revised for Version 5.6 (Release 2011a)September 2011 Online only Revised for Version 5.7 (Release 2011b)March 2012 Online only Revised for Version 5.8 (Release 2012a)September 2012 Online only Revised for Version 5.9 (Release 2012b)March 2013 Online only Revised for Version 5.10 (Release 2013a)September 2013 Online only Revised for Version 5.11 (Release 2013b)March 2014 Online only Revised for Version 6.0 (Release 2014a)October 2014 Online only Revised for Version 6.1 (Release 2014b)March 2015 Online only Revised for Version 6.2 (Release 2015a)September 2015 Online only Revised for Version 6.3 (Release 2015b)March 2016 Online only Revised for Version 7.0 (Release 2016a)September 2016 Online only Revised for Version 7.1 (Release 2016b)March 2017 Online only Revised for Version 7.2 (Release 2017a)September 2017 Online only Revised for Version 8.0 (Release 2017b)

  • Getting Started1

    Symbolic Math Toolbox Product Description . . . . . . . . . . . . . 1-2Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

    Create Symbolic Numbers, Variables, and Expressions . . . . . 1-3Create Symbolic Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3Create Symbolic Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4Create Symbolic Expressions . . . . . . . . . . . . . . . . . . . . . . . . . 1-4Reuse Names of Symbolic Objects . . . . . . . . . . . . . . . . . . . . . . 1-5

    Create Symbolic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7

    Create Symbolic Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9Use Existing Symbolic Variables . . . . . . . . . . . . . . . . . . . . . . 1-9Generate Elements While Creating a Matrix . . . . . . . . . . . . 1-10Create Matrix of Symbolic Numbers . . . . . . . . . . . . . . . . . . . 1-10

    Perform Symbolic Computations . . . . . . . . . . . . . . . . . . . . . . 1-12Differentiate Symbolic Expressions . . . . . . . . . . . . . . . . . . . . 1-12Integrate Symbolic Expressions . . . . . . . . . . . . . . . . . . . . . . 1-13Solve Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15Simplify Symbolic Expressions . . . . . . . . . . . . . . . . . . . . . . . 1-17Substitutions in Symbolic Expressions . . . . . . . . . . . . . . . . . 1-18Plot Symbolic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22

    Use Assumptions on Symbolic Variables . . . . . . . . . . . . . . . . 1-28Default Assumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28Set Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-28Check Existing Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . 1-29Delete Symbolic Objects and Their Assumptions . . . . . . . . . . 1-29

    v

    Contents

  • Using Symbolic Math Toolbox Software2

    Find Symbolic Variables in Expressions, Functions,Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3

    Find a Default Symbolic Variable . . . . . . . . . . . . . . . . . . . . . . 2-4

    Units of Measurement Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . 2-5Define and Convert Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5Use Temperature Units in Absolute or Difference Forms . . . . 2-6Verify Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7Use Units in Differential Equations . . . . . . . . . . . . . . . . . . . . 2-9

    Units List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13Mass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15Absorbed Dose or Dose Equivalent . . . . . . . . . . . . . . . . . . . . 2-15Acceleration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15Amount of Substance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Angular Momentum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Catalytic Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Conductance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Data Transfer Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Digital Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Dose Equivalent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Dynamic Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Electric Charge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Electric Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18Electric Dipole Moment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18Electric Potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18Electric Potential or Electromotive Force . . . . . . . . . . . . . . . 2-18Energy or Work or Heat . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18Energy Per Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19European Currency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19Field Strength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19Flow Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-20Former European Currency . . . . . . . . . . . . . . . . . . . . . . . . . 2-20Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21

    vi Contents

  • Frequency of Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21Fuel Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21Fuel Economy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21Gravity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21Heat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21Illuminance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22Inductance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22Ionising Dosage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22Kinematic Viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22Luminance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22Luminous Flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23Luminous Intensity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23Magnetic Flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23Magnetic Flux Density . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23Magnetic Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23Mass Per Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23Particle Per Amount of Substance . . . . . . . . . . . . . . . . . . . . . 2-24Plane Angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-24Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25Pressure or Stress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25Radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26Radioactivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26Reciprocal Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26Refractive Power of Lenses . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27Resistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27Solid Angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27Substance Per Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27Velocity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28

    Unit Conversions and Unit Systems . . . . . . . . . . . . . . . . . . . . 2-30Convert Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30Temperature Unit Conversion . . . . . . . . . . . . . . . . . . . . . . . 2-31Convert to SI, CGS, or US Unit Systems . . . . . . . . . . . . . . . . 2-32Define Custom Unit System from Existing System . . . . . . . . 2-34Define Custom Unit System Directly . . . . . . . . . . . . . . . . . . 2-36Unit System Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-37

    Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39Derivatives of Expressions with Several Variables . . . . . . . . 2-40More Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-41

    vii

  • Functional Derivatives Tutorial . . . . . . . . . . . . . . . . . . . . . . . 2-45

    Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-53One-Sided Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-53

    Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-56Integration with Real Parameters . . . . . . . . . . . . . . . . . . . . . 2-59Integration with Complex Parameters . . . . . . . . . . . . . . . . . 2-61High-Precision Numerical Integration Using Variable-Precision

    Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-62

    Symbolic Summation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64Comparing symsum and sum . . . . . . . . . . . . . . . . . . . . . . . . 2-64Computational Speed of symsum versus sum . . . . . . . . . . . . 2-65Output Format Differences Between symsum and sum . . . . . 2-65

    Taylor Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-67

    Pad Approximant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-70

    Find Asymptotes, Critical and Inflection Points . . . . . . . . . . 2-79Define a Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-79Find Asymptotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80Find Maximum and Minimum . . . . ....

Recommended

View more >