How to check if your answer is correct in Calculus

When working on a calculus problem, due to the fact that an answer can be expressed in many different forms, it is common that you may find that your answer differs from a given answer.

There are four methods to check if your answer is correct. Some methods may work better for certain solutions and not for others. Hence, if one method does not work, do try another method.

Method 1: Substitution

The first method is to do substitution. To determine if your answer matches the given answer, you can substitute 5 different values of x into the two expressions (your answer and the given answer).

For differentiation, the resulting values for each substitution should always be the same.

For integration, the resulting values for each substitution should always differ by a constant value (this value can be zero).

Let’s look at two examples.

Differentiation

Suppose the given answer is \frac{2}{\sqrt{x}} but your answer is \frac{2\sqrt{x}}{x}. To check if the two expressions are equivalent, we do the following:

Let x=1

\begin{aligned}\frac{2}{\sqrt{x}}&=\frac{2}{\sqrt{1}}=2\\
\frac{2\sqrt{x}}{x}&=\frac{2\sqrt{1}}{1}=2
 \end{aligned}

Let x=2

\begin{aligned}\frac{2}{\sqrt{x}}&=\frac{2}{\sqrt{2}}\approx1.41\\
\frac{2\sqrt{x}}{x}&=\frac{2\sqrt{2}}{2}\approx1.41
 \end{aligned}

Let x=3

\begin{aligned}\frac{2}{\sqrt{x}}&=\frac{2}{\sqrt{3}}\approx1.15\\
\frac{2\sqrt{x}}{x}&=\frac{2\sqrt{3}}{3}\approx1.15
 \end{aligned}

Let x=4

\begin{aligned}\frac{2}{\sqrt{x}}&=\frac{2}{\sqrt{4}}=1\\
\frac{2\sqrt{x}}{x}&=\frac{2\sqrt{4}}{4}=1
 \end{aligned}

Let x=5

\begin{aligned}\frac{2}{\sqrt{x}}&=\frac{2}{\sqrt{5}}\approx0.894\\
\frac{2\sqrt{x}}{x}&=\frac{2\sqrt{5}}{5}\approx0.894
 \end{aligned}

Given that the two expressions evaluate to the same value for each substitution, it is highly likely (but not definite) that the two expressions are equivalent. Hence, your answer is likely correct.

Next, let’s look at an integration example.

Integration

Suppose the given answer is (\sin{x}+\cos{x})^2 but your answer is \sin{2x}. To check if the two expressions are equivalent, we do the following:

Let x=1

\begin{aligned}(\sin{1}+\cos{1})^2&=1.909 \\\sin{2}&=0.909\\\text{Difference }&=1.909-0.909=1\end{aligned}

Note that your calculator should be in radian mode when working with trig functions in calculus.

Let x=2

\begin{aligned}(\sin{2}+\cos{2})^2&=0.243 \\\sin{4}&=-0.757\\\text{Difference }&=0.243-(-0.757)=1\end{aligned}

Let x=3

\begin{aligned}(\sin{3}+\cos{3})^2&=0.721 \\\sin{6}&=-0.279\\\text{Difference }&=0.721-(-0.279)=1\end{aligned}

Let x=4

\begin{aligned}(\sin{4}+\cos{4})^2&=1.989 \\\sin{8}&=0.989\\\text{Difference }&=1.989-(0.989)=1\end{aligned}

Let x=5

\begin{aligned}(\sin{5}+\cos{5})^2&=0.456 \\\sin{10}&=-0.544\\\text{Difference }&=0.456-(-0.544)=1\end{aligned}

Given that the two expressions evaluate to the same difference for each substitution, it is highly likely (but not definite) that the two expressions are equivalent. Hence, your answer is likely correct.

Method 2: Using Online Calculators (Direct)

The second method is to use online calculators.

For differentiation, a good online calculator is https://www.derivative-calculator.net/.

For integration, a good online calculator is https://www.integral-calculator.com/.

Both calculators give you the detailed step-by-step working. You can click on the “Show steps” button to see the steps. It is possible that your answer is one or two steps before the final answer.

Method 3: Using Online Calculators (Indirect)

Another method to check your answer is to use the same online calculators given in Method 2 above. However, instead of using the calculators directly, we use them to reverse our answers.

We know that integration is the inverse of differentiation and vice versa.

Say we differentiated \ln|{\sin{x}}|+2 and got \cot{x}.

We can use the integration calculator to integrate \cot{x} and see if we get back \ln|{\sin{x}}|+c.

Method 4: Using the subtraction method

The final method is to use the subtraction method. The idea behind the subtraction method is rather straightforward.

Suppose f(x)=g(x). If we evaluate f(x)-g(x), we should get zero.

We’ll be using the Wolfram calculator to do the subtraction method.

Entering inputs into the Wolfram calculator is rather straightforward. You can use the built-in buttons in most cases:

In addition, the calculator recognizes basic mathematical terms such as “minus”, “integrate”, “differentiate”, “sinx”, “lnx” etc.

For instance, to find the second derivative of 7x^4, we can just type “differentiate 7x^4 twice”.

To use the subtraction method, we do the following:

Step 1

Go to https://www.wolframalpha.com/ and type () \text{ minus } () into the textbox:

Step 2

In the first pair of parentheses, key in your answer. In the second pair of parentheses, key in the question.

Step 3

Press Enter and scroll down to the “Input interpretation” section. Ensure that Wolfram has interpreted your inputs correctly.

For this example, Wolfram interpreted the word “differentiate” as a partial differentiation. Hence, the symbol is \partial{x} instead of dx. This is fine as long as the expression to be differentiated (i.e., 7x^3) is correct.

Step 4

Scroll down further to see the answer.

For differentiation, the result should always be zero. For integration, the result can be any constant.

CAUTION:

It is possible for Wolfram to be unable to detect that two expressions are equivalent, even when they are. If that is the case, try any of the other methods mentioned above.

I’ve encountered numerous occasions where Wolfram interpreted my inputs wrongly. For instance, Wolfram may change the word “minus” to \times (-1).

Sometimes, it may change an expression like x(2x-1)^3 to (x(2x-1))^3, where the exponent is applied to both factors instead of just the second factor.

Hence, always ensure that Wolfram interpreted your inputs correctly. Using the built-in buttons to input the expressions tend to lead to fewer misinterpretations. In addition, using spaces before and after the word “minus” seems to help.

Last but not least, Wolfram displays \ln{x} as \log{(x)}. In addition, it considers the integral of \frac{1}{x} to be \log{(x)} instead of \ln{|x|} (i.e., it does not take the absolute value of x). Do be aware of these differences when working with logarithmic expressions.