# Calculus Calculator

This Calculus Calculator page does three primary things:

### Instructions

• Click the "Click here to start the Calculus Calculator" button. This only has to be done once.
• Enter the function you want to do stuff with.
• When you enter a function or a number, press the enter or tab button to update the page.

(If you have issues viewing the output make sure that your browser is set to accept third-party cookies. Thanks!)

## Mathematical Syntax with Examples

To enter mathematical expressions you need to know how to enter them into the Calculus Calculator. For example, when you write multiplication on a piece of paper you can denote it by a X, ., *, or with parentheses. With a Calculus Calculator you can't do that. You can only use an asterisk to denote multiplication. The tables below give you the syntax with examples so you'll know how to enter the function you want to work with.

### Basic Arithmetic

Math You WantInput ThisA Simple Example
Subtraction-x-4
Multiplication* (an asterisk)(4+2)*(x-4) and not (4+2)(x-4)
Division/(4+2)/(x-4)
Exponentiation^r^2 for $$r^2$$ or e^(x+2) for $$e^{x+2}$$
The constant $$\pi$$ (3.141592...)pipi*r^2 for the area of a circle ($$\pi r^2$$)
The constant $$e$$ (2.71828...)e4*e for $$4e=10.87312$$

### Polynomial Functions

Polynomials are the easiest way to demonstrate the use of the Calculus Calculator. A polynomial is a function of the form

$P(x)=a_nx^x+a_{n-1}x^{n-1}+\cdots+a_1x+a_0.$

For example, the function $$4x^2-3x+2$$ is a polynomial. Let's use it to demonstrate the Calculus Calculator.

First, input 4*x^2-3*x+2 into the "f(x)=" field, and then hit the tab or enter button. Now take a look at the table below for instructions on the different things you can do with $$4x^2-3x+2$$.

Math You WantDo This
Declare the function you want to work with. In this case $$4x^2-3x+2$$.Put 4*x^2-3*x+2 into the "f(x)=" field
Evaluate it at x=3
1. Click the "Evaluate Function?" checkbox
2. Enter 3 in the "Evaluate at x=" field
3. Hit the tab button
Find the limit $\lim_{x\to 2}4x^2-3x+2$
1. Click the "Find Limit?" checkbox
2. Put 2 in the "As x goes to:" field
3. Hit tab
Find its derivative $\frac{d}{dx}\Big( 4x^2-3x+2\Big)$Click the "Do Derivative?" checkbox.
Find its derivative at x=3
1. Do the step above
2. Click the "Evaluate Derivative?" checkbox
3. Enter 3 in the "Evaluate at x=" field
4. Hit tab
Find its second derivative $\frac{d^2}{dx^2}\Big( 4x^2-3x+2\Big)$Click the "Do Second Derivative?" checkbox.
Find its second derivative at x=3
1. Do the step above
2. Click the "Evaluate Second Derivative?"
3. Enter 3 in the "Evaluate at x=" field
4. Hit tab
5. 6
Find its indefinite integral $\int 4x^2-3x+2\,dx$Click the "Do Integral?" checkbox.
Find the definite integral $\int_0^{10} 4x^2-3x+2\,dx$
1. Do the step above.
2. Click the "Calculate Definite Integral" checkbox
3. Put 0 in the "Lower Limit" field
4. Put 10 in the "Upper Limit" field
5. Press the tab button
Graph it between -10 and 10
1. Click the "Graph it?" checkbox
2. Enter -10 into the "Min x-value" field and hit tab
3. Enter 10 into the "Max x-value" field and hit tab

The instructions above work for any function - not just polynomials. However, there are couple of things you need to know about logarithm and trigonometric functions as explained below.

### Exponential and Logarithm Functions

Math You WantInput ThisA Simple Example
Exponential Functione^x or exp(x)e^x for $$e^x$$ or exp(x+2) for $$e^{x+2}$$
Natural Logarithmln(x) or log(x)ln(x), log(x)
Common Logarithmlog(x,10)log(x,10)
Logarithm of Base blog(x,b)log(x,32)

In general there are an infinite number of logarithm functions. What distinguishes one logarithm function from another is its base. The most generic notation is something like $$\log_b(x)$$ where this is a logarithm function of base b. So when you see something like

$c=\log_b(a)$

this means that

$b^c=a.$For example, $$\log_39=2$$. Furthermore, $$\log_b(x)$$ and $$b^x$$ are inverses of each other so that

$\log_b(b^x)=x=b^{\log_b(x)}.$

Now when you see $$\log(x)$$ in textbooks this is taken to mean a logarithm of base 10 and when you see $$\ln(x)$$ this is a logarithm of base $$e=2.7183...$$. Mathematicians call $$\log(x)=\log_{10}(x)$$ the common logarithm and $$\ln(x)$$ the natural logarithm.

Now because the logarithm functions and their bases are inverses of each other we know that

$\log(10^x)=x=10^{\log(x)}$

and

$\ln(e^x)=x=e^{\ln(x)}.$

For the Calculus Calculator, it's important to know that ln(x) and log(x) both mean a natural logarithm. This is different from textbooks where $$\ln(x)$$ means the natural logarithm (base $$e$$) and $$\log(x)$$ means the common logarithm (base 10). If you want to work with a common logarithm, use the notation log(x,10).

One way to check the Calculus Calculator is to take an arbitrary base as a logarithm function. Let's choose 32 and input log(x,32) into the "f(x)=" area. Then select the "Evaluate Function?" checkbox and input 32. You should get a value of 1. That's because

$\log_{32}(32^1)=1.$

In general, we know that $$\log_b(x)=\ln(x)/\ln(b)$$. When you enter something like log(x,33) the calculator will do this conversion for you and show $$\log(x)/\log(33)$$. (Remember, it shows log and not ln because it uses log to mean a natural logarithm.)

Finally, if you do log(x,32) it will show you

$\frac{\log(x)}{5\log(2)}$

That's because $$32=2^5$$ and $$\ln(32)=\ln(2^5)=5\ln(2)$$. Then changing the $$\ln$$ to $$\log$$ because the calculator prefers that notation for the natural logarithm, you get the output you see on the screen.

### Trignonometric Functions

Math You WantInput ThisA Simple Example
sine, $$\sin \theta$$sin(x)sin(x) where x is in radians
cosine, $$\cos \theta$$cos(x)cos(x*(pi/180)) where x is in degrees
tangent, $$\tan \theta$$tan(x)
cotangent, $$\cot \theta$$cot(x)
secant, $$\sec \theta$$sec(x)
cosecant, $$\csc \theta$$cos(x)

Here's a quick recap of the basic Trig functions if you don't remember them:

Trigonometric Functions
$$\sin \theta=\frac{\mbox{opposite}}{\mbox{hypotenuse}}$$$$\cos \theta=\frac{\mbox{adjacent}}{\mbox{hypotenuse}}$$
$$\tan \theta=\frac{\mbox{oppostie}}{\mbox{adjacent}}$$$$\cot \theta=\frac{\mbox{adjacent}}{\mbox{opposite}}$$
$$\sec \theta=\frac{\mbox{hypotenuse}}{\mbox{adjacent}}$$$$\csc \theta=\frac{\mbox{hypotenuse}}{\mbox{opposite}}$$

And of course, always keep the triangle below in your head when you're thinking about Trigonometric functions.

Now, the most important thing to know about the Calculus Calculator when it comes to Trig functions is that they expect numbers to be input in radians and NOT degrees.

For example, we know that $$\sin(45^o)=0.707106781$$. But if you put sin(x) into the function field and evaluate it at "45" you'll get $$f(45)=0.850903524534118$$. This is wrong. It's wrong because it interprets the 45 as a number in radians and not degrees. If you want to find the value at 45 degrees, there are two things you can do:

• Convert 45 degrees to radians by multiplying by $$\pi/180$$. So put 45*(pi/180) or pi/4 in the "Evaluate at x=" field.
• Convert everything to degrees in the function. So enter sin(x*(pi/180)) in the "f(x)=" field.

Another way you see this is in evaluating definite integrals. For example, we know that

$\int_0^\pi\sin(x)dx=2.$

But if you put sin(x) into the "f(x)=" field and evaluate the function between 0 and 180 you'll get

$\int_0^{180}\sin(x)dx=1.59846006905786.$

This is because it's interpreting things to be in radians, but the upper limit of integration is in degrees. In other words, it's doing

$\int_0^{180}\sin(x)dx=-\cos(180)+1$

If you interpret the cosine as taking values in degrees like your calculator will do if it's set to degrees then, you get $$\cos(180)=-1$$ so that

$\int_0^{180}\sin(x)dx=-\cos(180)+1=-(-1)+1=2$

But the Calculus Calculator interprests things in radians like your calculator will do if it's set to radians. In this case $$\cos(180)=−0.598460069057858$$ so that

$$\begin{eqnarray}\int_0^{180}\sin(x)dx&=&-\cos(180)+1\nonumber\\&=&-(−0.598460069057858)+1\nonumber\\&=&1.59846006905786\nonumber\end{eqnarray}$$

So here's the moral of the story. If you plan on using Trigonometric functions and get numbers out of them, make sure what you put in is in radians and not degrees.