13.07.2015 Views

1.5.2 Differentiation - Wolfram Research

1.5.2 Differentiation - Wolfram Research

1.5.2 Differentiation - Wolfram Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

96 1. A Practical Introduction to Mathematica<strong>1.5.2</strong> <strong>Differentiation</strong>Here is the derivative of x n with respectto x.Mathematica knows the derivatives of allthe standard mathematical functions.This differentiates three times withrespect to x.In[1]:= D[ x^n , x ]-1 + nOut[1]= n xIn[2]:= D[ ArcTan[x] , x ]1Out[2]= -----------21 + xIn[3]:= D[ x^n, {x, 3} ]-3 + nOut[3]= (-2 + n) (-1 + n) n xThe function D[x^n, x] really gives a partial derivative, in which n is assumed not to depend on x.Mathematica has another function, called Dt, whichfindstotal derivatives, in which all variables are assumedto be related. In mathematical notation, D[f, x] is like @fdf, while Dt[f, x] is like . You can@x dxthink of Dt as standing for “derivative total”.Dt gives a total derivative, which assumes In[4]:= Dt[ x^n , x ]that n can depend on x. Dt[n, x]stands for dn . -1 + n ndx Out[4]= n x + x Dt[n, x] Log[x]This gives the total differential d(x n ).Dt[x] is the differential dx.In[5]:= Dt[ x^n ]-1 + n nOut[5]= n x Dt[x] + x Dt[n] Log[x]D[f, x]partial derivative @ @x fD[f, x 1 , x 2 , ... ] multiple derivative @@x 1D[f, {x, n}]repeated derivative @n f@x n@@x 2:::fDt[f]Dt[f, x]total differential dftotal derivative d dx fSome differentiation functions.As well as treating variables like x symbolically, you can also treat functions in Mathematica symbolically.Thus, for example, you can find formulas for derivatives of f[x], without specifying any explicitform for the function f.Mathematica does not know how todifferentiate f, soitgivesyoubackasymbolic result in terms of f'.In[6]:= D[ f[x], x ]Out[6]= f'[x]Web sample page from The Mathematica Book, Second Edition, by Stephen <strong>Wolfram</strong>, published by Addison-Wesley Publishing Company (hardcoverISBN 0-201-51502-4; softcover ISBN 0-201-51507-5). To order Mathematica or this book contact <strong>Wolfram</strong> <strong>Research</strong>: info@wolfram.com;http://www.wolfram.com/; 1-800-441-6284.© 1991 <strong>Wolfram</strong> <strong>Research</strong>, Inc. Permission is hereby granted for web users to make one paper copy of this page for their personal use. Further reproduction,or any copying of machine-readable files (including this one) to any server computer, is strictly prohibited.


1.5 Symbolic Mathematics 97Mathematica uses the chain rule tosimplify derivatives.In[7]:= D[ 2 x f[x^2], x ]2 2 2Out[7]= 2 f[x ] + 4 x f'[x ]Web sample page from The Mathematica Book, Second Edition, by Stephen <strong>Wolfram</strong>, published by Addison-Wesley Publishing Company (hardcoverISBN 0-201-51502-4; softcover ISBN 0-201-51507-5). To order Mathematica or this book contact <strong>Wolfram</strong> <strong>Research</strong>: info@wolfram.com;http://www.wolfram.com/; 1-800-441-6284.© 1991 <strong>Wolfram</strong> <strong>Research</strong>, Inc. Permission is hereby granted for web users to make one paper copy of this page for their personal use. Further reproduction,or any copying of machine-readable files (including this one) to any server computer, is strictly prohibited.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!