Wolfram Language Fast Introduction for Math Students
Get Started »

Derivatives

Calculate derivatives with the D command:

In[1]:=
Click for copyable input
D[x^6, x]
Out[1]=

Or use prime notation:

In[2]:=
Click for copyable input
Sin'[x]
Out[2]=

Differentiate user-defined functions:

In[1]:=
Click for copyable input
f[x_] := x^2 + 2 x + 1;
f'[x]
Out[1]=

Pass derivatives directly into a plot:

In[2]:=
Click for copyable input
Plot[{f[x], f'[x]}, {x, -3, 3}]
Out[2]=

You can also take multiple derivatives:

In[1]:=
Click for copyable input
D[x^6, {x, 3}]
Out[1]=

Or use the ' symbol multiple times:

In[2]:=
Click for copyable input
Sin''[x]
Out[2]=

As with earlier subjects, calculus formulas can be accessed via natural-language input:

In[1]:=
X
product rule formula
Out[1]=

QUICK REFERENCE: Calculus »