### Tangent Lines

Graphs a function f (x) and the line tangent to the graph of f (x) for a given x value.
How to use   ||   Examples   ||   Other Notes

Try the Derivative Calculator.
How to use
• Enter a function f (x) in the text input field marked "f (x)=" (Example: f (x)=ex)
• Click the "Graph" button (this button also refreshes the graph)
• Enter the derivative f '(x) in the text input field marked "f '(x)=" (Example: f '(x)=ex)
• Select an x value (Example: x=1)
This can be done in either of two ways:
• Click and drag the mouse on the graph -- value of x corresponds to horizontal mouse position on graph
• Enter the value in the text input field marked "x=" and click the "Graph" button to refresh
• To erase the graph and all input fields, click the "Clear" button
The text input fields marked "f (x)=" and "f '(x)=" can accept a wide variety of expressions to represent functions. The text input field marked "x=" can accept a real number in decimal notation. The buttons under the graph allow various manipulations of the graph coordinates.

For assistance computing the derivative f '(x), try the Derivative Calculator.

Examples
 Polynomial f (x)=x3+2x2-3x+1 f '(x)=3x2+4x-3 Exponential f (x)=ex f '(x)=ex Trigonometric f (x)=sin(x) f '(x)=cos(x) Product Rule f (x)=x sin(x) f '(x)=x cos(x) + sin(x) Chain Rule f (x)=e-x2 f '(x)=-2xe-x2 Incorrect f (x)=ex f '(x)=xex-1 (Improper use of Power Rule)

Other Notes:
The equation for the tangent line can be found using the point-slope form for the equation for a line: y-y0=m(x-x0). In this case, x0 is the given x value, y0=f (x0), and m=f '(x0).

Since the graphing procedures do not attempt to check the calculus computation of f '(x), the graph can show the visual consequences of incorrect calculations, as in the incorrect example above.

However, this also allows the graphing procedures to produce visual effects other than tangent lines. For example, using the slope m=-1/f '(x) gives lines normal to the graph of the function f (x), an effect which can be achieved in the graph by entering this m expression into the text input field marked "f '(x)=" (Example: f (x)=ex, m=-e-x).