Table of Contents
Welcome to the Introduction to calculus module. This module provides an overview of some key concepts in calculus, including limits, differentiation, integration, differential equations and vectors.
You may wish to work your way through the entirety of the module in the order provided, or you may wish to jump to certain pages or sections of the module.
Your feedback on this module is very welcome and can be provided at any time on the feedback page, or alternatively for any questions about the module please contact Library-UniSkills@curtin.edu.au
What you will learn
Limits are an important concept in calculus, as they are used to define continuity, derivatives and integrals. This page introduces limits and continuity, while subsequent pages explore derivatives and integration.
In brief, it covers the following:
Suppose we have a function \(f(x)\) and we investigate the value this function approaches as the input value \(x\) approaches a particular value, which we will call \(a.\) In this case we say we are finding the limit of \(f(x)\) as \(x\) approaches \(a,\) and we use the following notation to represent this:
\[\lim_{x \to a} f(x)\]Furthermore, sometimes we need to indicate whether we are approaching \(a\) from the left or the right, as the limit does not always give the same value. In this case we use the notation \(\lim_{x \to a^-} f(x)\) to indicate a left hand limit, and \(\lim_{x \to a^+} f(x)\) to indicate a right hand limit.
Note that in order for \(\lim_{x \to a} f(x)\) to exist, \(\lim_{x \to a^-} f(x)\) and \(\lim_{x \to a^+} f(x)\) need to be the same.
We can calculate the left hand and right hand limits of a function, and therefore determine if the limit of that function exists as \(x\) approaches a given value, using tables of values.
Example 1:
Use tables of values to investigate \(\lim_{x \to 3} (x^2 + 4x + 5)\)
Solution:
Limit as \(x\) approaches \(3\) from the left:
| \(x\) | \(x^2 + 4x + 5\) |
|---|---|
| 2.9 | 25.01 |
| 2.99 | 25.9001 |
| 2.999 | 25.990001 |
| 2.9999 | 25.99900001 |
Limit as \(x\) approaches \(3\) from the right:
| \(x\) | \(x^2 + 4x + 5\) |
|---|---|
| 3.1 | 27.01 |
| 3.01 | 26.1001 |
| 3.001 | 26.010001 |
| 3.0001 | 26.00100001 |
These tables indicate that:
\(\lim_{x \to 3^-} (x^2 + 4x + 5) =\) \(\lim_{x \to 3^+} (x^2 + 4x + 5) =\) \(26\)
Therefore:
\(\lim_{x \to 3} (x^2 + 4x + 5) = 26\)
The fact that \(\lim_{x \to 3} (x^2 + 4x + 5) = 26\) should not be surprising, as this is the value of \(x^2 + 4x + 5\) when \(x = 3\). In other words, \(\lim_{x \to 3} (x^2 + 4x + 5) = f(3)\)
In fact, the following is true for any function that is continuous at \(x = a\):
\(\lim_{x \to a} f(x) = f(a)\)
More information on continuity, and the conditions required for a function to be continuous at \(x = a,\) are covered in the following section.
Example 2:
Use tables of values to investigate \(\lim_{x \to 2} (\frac{1}{x-2})\)
Solution:
Limit as \(x\) approaches \(2\) from the left:
| \(x\) | \(x^2 + 4x + 5\) |
|---|---|
| 1.9 | -10 |
| 1.99 | -100 |
| 1.999 | -1000 |
| 1.9999 | -10000 |
| 1.99999 | -100000 |
Limit as \(x\) approaches \(2\) from the right:
| \(x\) | \(x^2 + 4x + 5\) |
|---|---|
| 2.1 | 10 |
| 2.01 | 100 |
| 2.001 | 1000 |
| 2.0001 | 10000 |
| 2.00001 | 100000 |
These tables indicate that:
\(\lim_{x \to 2^-} (\frac{1}{x-2}) = -\infty\)
\(\lim_{x \to 2^+} (\frac{1}{x-2}) = \infty\)
Therefore:
\(\lim_{x \to 2} (\frac{1}{x-2})\) does not exist
Note that while technically speaking a limit can not equal positive or negative infinity, and therefore if it tends towards one of these the limit does not exist, by stating that the limit tends towards positive or negative infinity (as above) we provide more information about the behaviour of the function close to the specified point.
Note also that the fact this limit does not exist means this function is not continuous. Again, more information is provided on continuity in the following section.
For now though, test your understanding of limits by working through the questions below:
Using tables of values, or by substituting \(x = 3\) into the function (since it is continuous at this point), we can determine that \(\lim_{x \to 3} (x^2 + 4) = 13\)
Using tables of values, we can determine that \(\lim_{x \to 1} (\frac{x^2-3x+2}{x-1}) = -1\)
Using tables of values, we can determine that this limit does not exist. If we want to provide more information about the limit, however, we could state that:
Using tables of values, or by substituting \(x = 2\) into \(f(x) = 5 - x^2\), we can determine that:
\(\lim_{x \to 2^-} f(x) =1\)
Similarly, using tables of values or by substituting \(x = 2\) into \(f(x) = x - 1\), we can determine that:
\(\lim_{x \to 2^+} f(x) =1\)
Therefore, \(\lim_{x \to 2} f(x) =1\)
If the graph of a function does not have any breaks or jumps in it (in other words, if you could draw the function without lifting your pencil from the paper) then that function is continuous everywhere. Note that even if a function is not continuous everywhere, often it is continuous except at a single value of \(x.\)
For example:

While the above is a good way of thinking about continuity, there is also a formal mathematical definition for it. This says that for a function \(f(x)\) to be continuous at \(x = a\) all of the following must be true:
Example:
Is the function \(f(x) = \frac{x+4}{x^2 + 3x - 40}\) continuous? If not, for which value or values is it discontinuous?
Solution:
Noting that dividing by \(0\) is undefined, we can factorise the denominator of this function to find the values of \(x\) such that it is equal to \(0.\) Factorising gives the following:
\(f(x) = \frac{x+4}{(x+8)(x-5)}\)
Finding the values of \(x\) such that \((x+8)(x-5) = 0\) gives \(x = -8\) and \(x = 5,\) which means the function is discontinuous at these values.
All polynomials are continuous everywhere. Furthermore, if two functions \(f(x)\) and \(g(x)\) are both continuous at \(x = a\) then:
Test your understanding of continuity by working through the questions below:
Yes, this function is continuous everywhere as it is a polynomial.
The denominator of this function is equal to \(0\) when \(x = 3,\) hence the function is discontinuous when \(x = 3\)
Factorising the denominator of this function gives:
\(f(x) = \frac{x - 2}{(x+8)(x+2)}\)
Since you can’t divide by \(0\) we need to find the values for \(x\) such that \((x+8)(x+2) = 0,\) which gives \(x = -8\) and \(x = -2\)
This means the function is discontinuous at these values.
\(h(x) = f(x) + g(x),\) and since \(f(x)\) and \(g(x)\) are both continuous at \(x = 1\) it follows that \(h(x)\) must also be continuous at \(x = 1\)
The derivative of a function \(f(x)\) is the rate of change of that function with respect to its input value, \(x\). To find the derivative we use the process of differentiation, and rules for this are covered in this page.
In brief, it covers the following:
First, though, we will delve a bit deeper into the concept of a derivative.
In order to understand derivatives we need to start with the graph of a function, and the slope of that graph.
Consider the graph:

We can find the slope, or gradient, of this graph by choosing two points along the graph and dividing the change in \(y\) by the change in \(x,\) as shown:

Note that as the function plotted in the graph above is a linear function, the slope is the same at all points on the graph. However, if the function is not linear this is not the case, and instead the slope will be different at different points. In particular, the slope at any given point will be the slope of the tangent to the curve at that point (where the tangent is the straight line that touches the curve at the point). For example, the tangent to the function \(f(x) = x^2 + 1\) at \(x = 0\) is as follows:

As this tangent is horizontal it has a slope of \(0,\) meaning the slope of \(f(x) = x^2 + 1\) at \(x = 0\) is \(0.\) However, while this is true at this particular point, calculating the slope at other points requires us to calculate the slope of the line between that point and another point as the second point gets closer and closer. In other words, it requires us to find the slope of the line as the difference between the two \(x\) values approaches zero.
In order to do this, we can return to our equation for the slope of a line. Writing change in using the Greek letter delta \(\Delta\) instead, it becomes:
\[Slope\,=\,\frac{\Delta\,y}{\Delta\,x}\]Then as the change in the \(x\) values approaches zero, it can be written as the following limit:
\[\lim_{\Delta x \to 0} \frac{\Delta\,y}{\Delta\,x}\]This is called the derivative of the function. Rather than writing it as above though, we write it as \(\frac{dy}{dx}\)
Alternatively, if we use the function name \(f(x)\) instead we can write the derivative as the following limit, where \((x, f(x))\) is the point of interest and \(h\) is the difference between this and the second point, \((x+h, f(x+h)):\)
\[\lim_{h \to 0} \frac{f(x + h) - f(x)}{h}\]Example:
Find the derivative of \(f(x) = x^2 + 1\)
Solution:
Substituting this function into the limit above gives:
\[\begin{aligned} \lim_{h \to 0} \frac{((x+h)^2 + 1) - (x^2 + 1)}{h} &= \lim_{h \to 0} \frac{x^2 + 2xh + h^2 + 1 - x^2 - 1}{h}\\\ &= \lim_{h \to 0} \frac{2xh + h^2}{h}\\\ &= \lim_{h \to 0} 2x + h\\\ &= 2x\\\ \end{aligned}\]So the derivative of this function is \(2x\)
In this case, the derivative of the function is called the prime of the function and is written as \(f'(x)\). This is read as f-prime of \(x\) and means the derivative of \(f(x)\) with respect to \(x\).
Therefore, if \(y\,=\,f(x)\), the derivative of that function will be written as:
\[\frac{dy}{dx}\;\]or
\[f'(x)\](It may also be written as \(\frac{d}{dx}\,y\) or \(\frac{d}{dx}\,f(x),\) but this notation won’t be used here.)
Note that the derivatives discussed so far are referred to as first derivatives, as we are only differentiating once. While these are the only kinds of derivatives covered on this page, it is important to be aware that you can differentiate again to give the second derivative \(\frac{d^2y}{dx^2},\) and again to give the third derivative \(\frac{d^3y}{dx^3},\) and so on.
Rather than calculating the limit each time as above, there are a set of general rules to follow in order to find the derivative of any given function. You may need to use any number of these rules, depending on the elements within the function, in order to find the derivative.
The derivative of a constant number, \(c\), is always zero.
If
\[f(x)\,=\,c\]then
\[f'(x)\,=\,0\]Example:
Find the derivative of \(f(x)\,=\,3\)
Solution:
Using the constant rule, \(f'(x)\,=\,0\)
When \(x\) has a coefficient, the derivative will just be the coefficient.
If
\[f(x)\,=\,nx\]then
\[f'(x)\,=\,n\]Example:
Find the derivative of:
\[f(x)\,=\,7x\]Solution:
\[f'(x)\,=\,7\]When \(x\) has an indice, multiply \(x\) by that indice, and then reduce the indice by one.
If
\[f(x)\,=\,x^n\]then
\[f'(x)\,=\,n\,x^{n-1}\]Example 1:
What is \(f'(x)\) given \(f(x)\,=\,x^4\)
Solution:
\[f'(x)\,=\,4x^3\]Example 2:
What is the derivative of \(y\,=\,3\,x^2\)
Solution:
\(\begin{aligned} \frac{dy}{dx} &= 2 \times 3x^{2-1} \\\ &= 6x \\\ \end{aligned}\)
We can also find the derivatives of the trigonometric functions \(sin\), \(cos\), and \(tan\). It’s important to note that when working with the derivatives of trigonometric functions, \(x\) will be in radians.
The derivative of \(sin\) is \(cos\). So if
\[f(x)\,=\,sin\,x\]then
\[f'(x)\,=\,cos\,x\]The derivative of \(cos\) is negative \(sin\). So if
\[f(x)\,=\,cos\,x\]then
\[f'(x)\,=\,-\,sin\,x\]And the derivative of \(tan\) is \(sec^2\), where \(sec\) is another trigonometric function. So if
\[f(x)\,=\,tan\,x\]then
\[f'(x)\,=\,sec^2\,x\]Example:
If \(f(x)\,=\,2sin\,x\;+\;cos\,x\), find \(f'(x)\)
Solution:
\[f'(x)\,=\,2cos\,x\;-\;sin\,x\]Taking it further, when \(x\) has a coefficient in a trigonometric function, the derivative is multiplied by this coefficient.
Example:
If \(f(x)\,=\,2tan\,2x\), find \(f'(x)\)
Solution:
Since the \(x\) in the trigonometric function has a coefficient of \(2\), our solution will be:
\[\begin{aligned} f'(x) &= 2 \times 2\,sec^2\,2x \\\ &= 4\,sec^2\,2x \\\ \end{aligned}\]To find the derivative of a power function of Euler’s number, \(e\), simply multiply the function by the derivative of the power.
If
\[y = e^{f(x)}\]then
\[\frac{dy}{dx} = f'(x)\,e^{f(x)}\]Example:
Find the derivative of \(f(x) = e^x\)
Solution:
\[\begin{aligned} f'(x) &= 1 \times e^x \\\ &= e^x \\\ \end{aligned}\]Example 2:
Find the derivative of \(f(x) = e^{3x^5 + 1}\)
Solution:
\[f'(x) = 15x^4\,e^{3x^5 + 1}\]You may also have to find the derivatives of functions containing logarithms.
If
\[f(x) = log_a\,x\]then
\[f'(x) = \frac{1}{x\,ln\,a}\]Example 1:
Find the derivative of \(f(x) = log_2\,x\)
Solution:
\(\begin{aligned}
f'(x) &= \frac{1}{x\,ln\,a} \\\
&= \frac{1}{x\,ln\,2} \\\
\end{aligned}\)
Example 2:
Find the derivative of \(f(x) = log_{10}\,{5x}\)
Solution:
Using the logarithm laws we have:
\[f(x) = log_{10}\,5 + log_{10}\,x\]Since \(log_{10}\,5\) is a constant, it’s derivative will be \(0\). Therefore \(f(x) = log_{10}\,x\) is the only part that needs to be differentiated:
\[f'(x) = \frac{1}{x\,ln\,{10}}\]If your logarithm is the natural logarithm \(ln,\) the derivative is simplified.
If
\[f(x) = ln\,x\]then
\[f'(x) = \frac{1}{x}\]Example 1:
Find the derivative of \(f(x) = ln\,{3x}\)
Solution:
Using log laws, we know that:
\[f(x) = ln\,3 + ln\,x\]Since \(ln\,3\) is a constant, we have:
\[f'(x) = \frac 1x\]Example 2:
Find the derivative of \(f(x) = ln(x^2)\)
Solution:
Using log laws, we know that:
\[f(x) = 2\,ln\,x\]Therefore, we have:
\[\begin{aligned} f'(x) &= 2 \times \frac 1x \\\ &= \frac 2x \\\ \end{aligned}\]Note: To differentiate logarithms of functions, you will need to use the chain rule.
Test your knowledge of the above differentiation rules by having a go at finding the derivatives of the functions below:
Using log laws, we know that
\[f(x) = 3 log_4 x\]So the derivative will be
\[\begin{aligned} f'(x) &= 3(\frac{1}{xln4}) \\\ &= \frac{3}{xln4} \\\ \end{aligned}\]You may have to use differentiation to find the derivatives of two related functions, for example \(f(x)\) and \(g(x).\) How these functions are related will determine which rule you use to find the derivative.
When two functions are added together or subtracted from each other, we find the derivative of each function and keep the relevant operation.
If
\[y\,=\,f(x)\,\pm\,g(x)\]then
\[\frac{dy}{dx}\,=\,f'(x)\,\pm\,g'(x)\]Example:
Find the derivative of \(y\) given that \(y\,=\,f(x)\,+\,g(x),\) \(f(x)\,=\,4x\,+2\) and \(g(x)\,=\,3x^2\)
Solution:
\(f'(x)\,=\,4\) and \(g'(x)\,=\,6x,\) therefore:
\[\frac{dy}{dx}\,=\,4\,+\,6x\]Test your knowledge of the sum and difference rule by using it to find the derivatives of the functions below:
Which is then simplified to be:
\[f'(x) = -12x^2 + 10x + 5\]The product rule is used when two functions are being multiplied together.
If we have
\[y\,=\,f(x)\,\times\,g(x)\]then the derivative will be
\[\frac{dy}{dx}\,=\,g(x)\,\times\,f'(x)\;+\;f(x)\,\times\,g'(x)\]Example:
Given \(y\,=\,(3x\,+\,4) \times (2x^3\,+\,x\,-\,7)\), use the product rule to find \(\frac{dy}{dx}\)
Solution:
Let \(f(x)=3x\,+\,4\) and \(g(x)=2x^3\,+\,x\,-\,7\)
We can now use the product rule to find \(\frac{dy}{dx}\)
\[\begin{aligned} \frac{dy}{dx} &= g(x)\,\times\,f'(x)\;+\;f(x)\,\times\,g'(x) \\\ &= (2x^3\,+\,x\,-\,7) \times (3)\;+\;(3x\,+\,4) \times (6x\,+\,1) \\\ \end{aligned}\]We then simplify the expression:
\[\begin{aligned} \frac{dy}{dx} &= (2x^3\,+\,x\,-\,7) \times (3)\;+\;(3x\,+\,4) \times (6x\,+\,1) \\\ &= 6x^3\,+\,3x\,-\,21\,+\,18x^2\,+\,3x\,+\,24x\,+\,4 \\\ &= 6x^3\,+\,3x\,-\,21\,+\,18x^2\,+\,27x\,+\,4 \\\ &= 6x^3\,+\,18x^2\,+\,30x\,-\,17 \\\ \end{aligned}\]Test your knowledge of the product rule by using it to find the derivatives of the functions below:
Which can then be expanded and simplified to:
\[f'(x) = 40x^4 + 42x^2 - 15\]Which can then be expanded and simplified into:
\[f'(x) = 12x^3 - 6x^2 + 6\]The quotient rule is used when one function is being divided by another.
If we have
\[y\,=\,\frac{f(x)}{g(x)}\]then the derivative will be
\[\frac{dy}{dx}\,=\,\frac{g(x)\,\times\,f'(x)\;-\;f(x)\,\times\,g'(x)}{(g(x))^2}\]Example:
Find \(\frac{dy}{dx}\) given \(y=\frac{3x+5}{2x-2}\)
Solution:
Let \(f(x)=3x+5\) and \(g(x)=2x-2\)
We can now find \(\frac{dy}{dx}\) using the quotient rule.
\[\begin{aligned} \frac{dy}{dx} &= \frac{g(x)\,\times\,f'(x)\;-\;f(x)\,\times\,g'(x)}{(g(x))^2} \\\ &= \frac{(2x-2) \times (3)\;-\;(3x+5) \times (2)}{(2x-2)^2} \\\ \end{aligned}\]We then simplify the expression:
\[\begin{aligned} \frac{dy}{dx} &= \frac{(2x-2) \times (3)\;-\;(3x+5) \times (2)}{(2x-2)^2} \\\ &= \frac{(6x-6)\,-\,(6x+10)}{(2x-2)^2} \\\ &= -\,\frac{16}{(2x-2)^2} \\\ \end{aligned}\]Test your knowledge of the quotient rule by using it to find the derivatives of the functions below:
Which we can then expand and simplify into:
\[\frac{dy}{dx} = \frac{4x^2 + 10x - 8}{(x^2 + 2)^2}\]Which can then be simplified into:
\[\frac{dy}{dx} = \frac{10x\,cos\,3x + 15x^2sin\,3x + 9sin\,3x}{(cos\,3x)^2}\]The chain rule applies when one function relies on the answer from another function, or when one function contains another function.
For example, if we have a function \(y\) that contains the variable \(u\), and we have a function \(u\) that contains the variable \(x\), in order to find the derivative \(\frac{dy}{dx}\) we would first need to find \(\frac{dy}{du}\) and then \(\frac{du}{dx}\). The chain rule says we can then multiply these together to get \(\frac{dy}{dx}\).
If we want to find \(\frac{dy}{dx}\) and we know \(\frac{dy}{du}\) and \(\frac{du}{dx}\) then
\[\frac{dy}{dx}\,=\,\frac{dy}{du}\,\times\,\frac{du}{dx}\]Example 1:
Find \(\frac{dy}{dx}\) given \(y\,=\,10u\) and \(u\,=\,-4x^2\,+\,2x\)
Solution:
The first thing we have to do is find \(\frac{dy}{du}\):
Next, we need to find \(\frac{du}{dx}\):
\[\begin{aligned} \frac{du}{dx} &= 2 \times (-4)x^{2-1}\,+\,2 \\\ &= -8x\,+\,2 \\\ \end{aligned}\]Now, using the chain rule, we can find \(\frac{dy}{dx}\):
\[\begin{aligned} \frac{dy}{dx} &= \frac{dy}{du}\,\times\,\frac{du}{dx} \\\ &= 10 \times (-8x\,+\,2) \\\ &= -80\,x\,+\,20 \\\ \end{aligned}\]Example 2:
We can use the chain rule to differentiate the logs of functions. As an example, find the derivative of \(y = ln(2x^2 + 3)\)
Solution:
Let \(u = 2x^2 + 3,\) so \(y = ln\,u\) and we have \(\frac{du}{dx} = 4x\) and \(\frac{dy}{du} = \frac{1}{u}.\) Our integral can then be evaluated as follows:
\[\begin{aligned} \frac{dy}{dx} &= \frac{dy}{du} \times \frac{du}{dx} \\\ &= \frac{1}{u} \times 4x \\\ &= \frac{4x}{u} \\\ &= \frac{4x}{2x^2 + 3} \\\ \end{aligned}\]Test your knowledge of the chain rule by using it to find the derivatives of the functions below:
Let \(u = 2x^2 + 1,\) so \(y = cos\,u\) and we have \(\frac{du}{dx} = 4x\) and \(\frac{dy}{du} = -sin\,u.\) Our derivative can then be evaluated as follows:
\[\begin{aligned} \frac{dy}{dx} &= \frac{dy}{du} \times \frac{du}{dx} \\\ &= -sin\,u \times 4x \\\ &= -4x\,sin\,u \\\ &= -4x\,sin(2x^2 + 1) \\\ \end{aligned}\]Let \(u=3x^2 + 2,\) so \(y = u^4\) and we have\(\frac{du}{dx} = 6x\) and \(\frac{dy}{du} = 4u^3.\) Our derivative can then be evaluated as follows:
\[\begin{aligned} \frac{dy}{dx} &= \frac{dy}{du} \times \frac{du}{dx} \\\ &= 4u^3 \times 6x \\\ &= 4(3x^2 + 2)^3 \times 6x \\\ &= 24x(3x^2 + 2)^3 \\\ \end{aligned}\]Let \(u = 3x^2 + 1,\) so \(y = log_5\,u\) and we have \(\frac{du}{dx} = 6x\) and \(\frac{dy}{du} = \frac{1}{u\,ln\,5}.\) Our derivative can then be evaluated as follows:
\[\begin{aligned} \frac{dy}{dx} &= \frac{dy}{du} \times \frac{du}{dx} \\\ &= \frac{1}{u\,ln\,5} \times 6x \\\ &= \frac{6x}{u\,ln\,5} \\\ &= \frac{6x}{(3x^2 + 1)\,ln\,5} \\\ \end{aligned}\]\(\frac{du}{dx} = cos\,x\) and \(\frac{dy}{du} = 10u + 2,\) so our derivative can be evaluated as follows:
\[\begin{aligned} \frac{dy}{dx} &= \frac{dy}{du} \times \frac{du}{dx} \\\ &= (10u + 2) \times cos\,x \\\ &= (10\,sin\,x + 2)(cos\,x) \\\ \end{aligned}\]The integral of a function is used to find the area under the graph of that function. There are two types of integrals, definite integrals and indefinite integrals. To find the integral of a function we use the rules of integration.
Indefinite integrals can also be called antiderivatives, and integration can be called antidifferentiation. This is because integration is the inverse of differentiation.
In brief, this page covers the following:
Consider the graph:

If we wanted to find the area between the graph and the \(x\)-axis we could calculate the function at a few points and add these up, essentially breaking the area up into smaller parts.

The smaller the parts we use, or the smaller the change in \(x\), the more accurate we can be in our answer. However, this also means more work as there will be an infinite number of parts that could be used to find the area. Instead of doing a lot of individual calculations and adding up all these individual parts, we can use integration to find the integral of the function and use that to calculate the area under the graph.
For example, consider the graph below:

We know that the formula to calculate the area of a triangle is \(\frac 12 base \times height\). In this example, our base is going to be the value of \(x\), and our height will be \(2x\). So we have:
\[\begin{aligned} Area\;under\;the\;graph &= \frac 12 (x)(2x) \\\ &= x^2 \\\ \end{aligned}\]This means that the integral of the function \(y = 2x\) is \(x^2\). You may notice that if we were asked to find the derivative of that integral, the answer would be \(2x\).
Integrals don’t always appear as simple as this example, but that’s why we have rules we can follow to help us integrate any given function.
If we have \(y = f(x)\), the notation for the integral of that function will look like:
\[\int f(x)\,dx\]The \(\int\) is the mathematical integral symbol, and \(dx\) represents the change in \(x\).
This notation is used when finding an indefinite integral.
An indefinite integral does not have any defined limits. Finding the indefinite integral of a function is the same as finding the antiderivative of that function. Your answer will still look like a function rather than a value, and will be the inverse of the derivative.
A definite integral has defined upper and lower limits. These are the values of \(x\) between which you are being asked to find the area under the graph.
The notation of a definite integral will have values, or limits, attached to the integral symbol \(\int\):
\[\int_a^b f(x)\,dx\]This is asking us to find the integral of the function \(f(x)\) between \(x=a\) and \(x=b\), that is, the value of the area under the graph between \(x=a\) and \(x=b\):

This is performed by finding the value of the integral at \(x=a\) and subtracting it from the value of the integral at \(x=b\):
\[\int_a^b f(x)\,dx = \int f(b) - \int f(a)\]Note: if you have a negative definite integral, you can make it positive by swapping the limits.
\[- \int_b^a f(x)\,dx = \int_a^b f(x)\,dx\]In general, if you are required to find the integral of a function, you are probably being asked to find the definite integral. If you are required to find the indefinite integral of a function, you may be asked to find the antiderivative and will not be given any limits.
The rules of integration are the inverse of the rules of differentiation. If you’d like to know more about differentiation and how it compares to integration, have a look at our guide to derivatives.
Each of the rules below have the notation expected for indefinite integrals. However, there are also examples for finding definite integrals using each rule.
You’ll notice that each indefinite integral includes a \(+ C\). This is known as the constant of integration. This is added onto the end of indefinite integrals as the derivative of any real constant is zero, and we need to include the possibility that our integral contains a constant. The constant of integration is not required for definite integrals.
The integral of a constant will always be that same constant multiplied by a variable, usually \(x\).
The integral of a constant will be:
\[\int a\;dx\;=\;ax+C\]Example 1:
Find the antiderivative of \(y = 8\)
Solution:
\[\int 8\;dx = 8x + C\]Example 2:
Evaluate the definite integral \(\int_2^5 7\,dx\)
Solution:
\[\begin{aligned} \int_2^5 \,7\,dx &= 7(5) - 7(2) \\\ &= 35 - 14 \\\ &= 21 \\\ \end{aligned}\]When finding the integral of a variable with a power, add one to the power and then divide it by that same new power.
The integral of a variable with a power will be:
\[\int x^n\,dx = \frac{x^{n+1}}{n+1} + C\]Example 1:
Find the indefinite integral of \(y=x\)
Solution:
\[\int x\,dx = \frac{x^2}{2} + C\]Example 2:
Find the indefinite integral of \(y=2x^5\)
Solution:
\[\begin{aligned} \int 2x^5\,dx &= \frac{2x^6}{6} + C \\\ &= \frac{x^6}{3} + C \\\ \end{aligned}\]Example 3:
Evaluate \(\int_5^8 2x^2 dx\)
Solution:
\[\begin{aligned} \int_5^8 \,2x^2\,dx &= \frac{2(8)^3}{3} - \frac{2(5)^3}{3} \\\ &= \frac{1024}{3} - \frac{250}{3} \\\ &= 258 \\\ \end{aligned}\]If the function is being multiplied by a constant, we can move the constant and place it outside the integration symbol. We can then put it back in front of our integrated function. Let’s have a look at some of the examples from above and see if we get the same results using the multiplier constant rule.
Example 1:
Find the indefinite integral of \(y=2x^5\)
Solution:
We want to find \(\int 2x^5\,dx\), but let’s move the constant first.
\[2 \int x^5\,dx\]Now, we can find the integral of our function, and multiply it by our constant, \(2\), again.
\[\begin{aligned} 2 \int x^5\,dx &= 2 \frac{x^6}{6} + C \\\ &= \frac{x^6}{3} + C \\\ \end{aligned}\]Example 2:
Evaluate \(\int_5^8 2x^2 dx\)
Solution:
Again, we can first move the multiplier constant outside of the integration.
\[\begin{aligned} 2\,\int_5^8 \,x^2\,dx &= 2 (\frac{(8)^3}{3} - \frac{(5)^3}{3}) \\\ &= 2 (\frac{512}{3} - \frac{125}{3}) \\\ &= 2(129) \\\ &= 258 \\\ \end{aligned}\]As you can see, using the multiplier constant rule gives the same answer for the examples that we saw while trying out the power rule above. These examples were just to demonstrate that it worked and while it may not always be necessary to use the multiplier constant rule, it’s good to know it is an option when integrating functions as it can assist in solving more difficult integrals, such as when having to use integration by substitution.
We can also find the integral of the trigonometric functions \(sin\), \(cos\), and \(tan\). It’s important to note that when working with the integrals of trigonometric functions, \(x\) will be in radians.
The integral of \(sin\) is \(-cos\):
\[\int sin\,x\,dx = -cos\,x + C\]The integral of \(cos\) is \(sin\):
\[\int cos\,x\,dx = sin\,x + C\]The integral of \(tan\) is a little more complicated, due to the nature of the graph of \(y = tan\,x\). To find the integral of \(tan\) you need to use integration by substitution. This will give you the following (where \(\vert sec\,x \vert\) represents the absolute value of \(sec\,x\) , which is its non-negative value):
\[\int tan\,x\,dx = ln\,|sec\,x|\, + C\]Example 1:
Find \(\int 3\,sin\,x\,dx\)
Solution:
\[\begin{aligned} \int 3\,sin\,x\,dx &= 3\,\int sin\,x\,dx \\\ &= - 3\,cos\,x + C \\\ \end{aligned}\]Example 2:
Evaluate \(\int_0^{\pi} 2\,sin\,x\,dx\)
Solution:
\[\begin{aligned} \int_0^{\pi} 2\,sin\,x\,dx &= 2 \int_0^{\pi} sin\,x\,dx \\\ &= 2(- cos\,\pi - (-cos\,0)) \\\ &= 2(1 + 1) \\\ &= 4 \\\ \end{aligned}\]We can also find the integral of \(e^x\). We can easily find the integral of \(e\), even when \(x\) has a coefficient. If \(x\) has its own power, we need to start using imaginary numbers, and that is not covered in this module.
The integral of \(e^x\) is \(e^x\):
\[\int e^x\,dx = e^x + C\]When \(x\) has a coefficient, we divide the answer by this number:
\[\int e^{ax}\,dx = \frac{e^{ax}}{a} + C\]Finally, we can use exponent laws to expand this one step further as follows:
\[\int e^{ax + b}\,dx = \frac{e^{ax + b}}{a} + C\]Example 1:
Determine the integral of
\[\int e^{3x+2}\,dx\]Solution:
\[\int e^{3x+2}\,dx = \frac{e^{3x+2}}{3} + C\]Example 2:
Evaluate the integral
\[\int_2^3 e^{3x}\,dx\]Solution:
\[\begin{aligned} \int_2^3 e^{3x}\,dx &= \frac{e^{3(3)}}{3} - \frac{e^{3(2)}}{3} \\\ &= 2701.03 - 134.48 \\\ &= 2566.55 \end{aligned}\]We can find the integral of logarithms with various bases, however as the natural log \(ln\) (the log with base \(e\), so \(log_e\)) is more frequently used in calculus it is the only one covered here.
The integral of the natural log, \(ln\,x,\) is:
\[\int ln\,x\,dx = x\,ln\,x - x + C\]or
\[\int ln\,x\,dx = x\,(ln\,x - 1) + C\]Example 1:
Find the antiderivative of \(f(x) = ln\,(2x)\)
Solution:
Using the logarithm laws we know that \(ln\,(2x) = ln\,x + ln\,2\)
\[\begin{aligned} \therefore \quad \int ln\,2x\,dx &= \int (ln\,x + ln\,2)\,dx \\\ &= \int ln\,x\,dx + \int ln\,2\,dx \\\ &= x\,ln\,x - x + x\,ln\,2 + C \\\ \end{aligned}\]Example 2:
Calculate the integral below to 3 decimal places.
\[\int_1^3 \frac{1}{2} ln\,x\,dx\]Solution:
\[\begin{aligned} \int_1^3 \frac{1}{2} ln\,x\,dx &= \frac{1}{2} \int_1^3 ln\,x\,dx \\\ &= \frac{1}{2}((3\,ln\,3 - 3) - (ln\,1 - 1)) \\\ &= \frac{1}{2}((3\,ln\,3 - 3) - (-1)) \\\ &= \frac{1}{2}(3\,ln\,3 - 2) \\\ &= 0.648 \\\ \end{aligned}\]Now that we’ve had a look at logarithms, it’s important to have a look at the integral of reciprocals. A reciprocal is also known as a (multiplicative) inverse. For example, the inverse of \(2\) is \(\frac{1}{2},\) and the inverse of \(x\) is \(\frac{1}{x}\) (this is known as the reciprocal function).
The integral of the reciprocal function is as follows (where \(\vert x \vert\) represents the absolute value of \(x\) , which is its non-negative value):
\[\int \frac{1}{x}\,dx = ln\,|x|\,+ C\]Furthermore, we can use the multiplier constant rule to establish that:
\[\int \frac{a}{x}\,dx = a\,ln\,|x|\,+ C\]Example 1:
Find the antiderivative of \(f(x) = \frac{2}{x}\)
Solution:
\[\int \frac{2}{x}\,dx = 2\,ln\,|x|\,+ C\]Example 2:
Calculate the integral below. Give your answer to two decimal places.
\[\int_1^2 \frac{1}{4x}\,dx\]Solution:
\[\begin{aligned} \int_1^2 \frac{1}{4x}\,dx &= \frac{ln\,(2)}{4} - \frac{ln\,(1)}{4} \\\ &= \frac{ln\,(2)}{4} - 0 \\\ &= \frac{ln\,(2)}{4} \\\ &= 0.17 \\\ \end{aligned}\]To find the integral of two (or more) functions that are being added together or subtracted from each other, we can find the integral of each one separately first, and keep the relevant operation.
The integral of \(y\,=\,f(x)\,\pm\,g(x)\) will be:
\[\int (f(x)\,\pm\,g(x))\,dx = \int f(x)\,dx \pm \int g(x)\,dx\]Example 1:
Find the antiderivative:
\[\int (sin\,x - 3x^2 + 7x - 4)\,dx\]Solution:
\[\begin{aligned} \int (sin\,x - 3x^2 + 7x - 4)\,dx &= \int sin\,x\,dx - \int 3x^2\,dx + \int 7x\,dx - \int 4\,dx \\\ &= -cos\,x - \frac{3x^3}{3} + \frac{7x^2}{2} - 4x + C \\\ \end{aligned}\]Example 2:
Evaluate the definite integral below. Give your answer to 3 decimal places.
\[\int_5^{10} (3x - cos\,x)\,dx\]Solution:
\[\begin{aligned} \int_5^{10} (3x - cos\,x)\,dx &= \int_5^{10} 3x\,dx - \int_5^{10} cos\,x\,dx \\\ &= (\frac{3(10^2)}{2} - \frac{3(5^2)}{2}) - (sin\,10 - sin\,5) \\\ &= (150 - 37.5) - ((-0.544) - (-0.959)) \\\ &= 112.5 - 0.415 \\\ &= 112.085 \end{aligned}\]Check your understanding of the rules of integration by working through the questions below:
In some specific cases, we can use integration by substitution to find the integral of a function. This method is also known as \(u\)-substitution as it involves using the letter \(u\) to represent part of the function we are integrating, or as the reverse chain rule as it requires you to recognise the derivative of a function.
Given two functions \(f(x)\) and \(g(x)\), we can use integration by substitution if our integral looks like this:
\[\int f(g(x))\;g'(x)\,dx\]Leaving the above as it is would make finding the integral difficult, but we can change it to make it simpler for ourselves using integration by substitution. Specifically, we let \(u = g(x),\) which gives \(g'(x)\,dx = (\frac{du}{dx})\,dx = du.\) The integral is then simplified as shown below.
Integration by substitution says that if we have:
\[\int f(g(x))\;g'(x)\,dx\]then we can substitute \(u = g(x)\) and \(du = g'(x)\,dx\) to give:
\[\int f(u)\,du\]We can then integrate with respect to \(u,\) before substituting \(g(x)\) back into the answer to remove \(u.\) Note also that even if the integral is not in the stated format, you can still integrate by substitution by taking out a multiplier constant as required.
Example 1:
Evaluate \(\int ln(2x+3)\,dx\)
Solution:
For this example it makes sense to use \(u = 2x+3.\) However, the derivative of \(2x+3\) is \(2\) and we don’t have this in our integral. We can fix this by including it in the integral as \(g'(x)\) and then taking out the multiplier constant of \(\frac{1}{2}\) to compensate though, as follows:
\[\int ln(2x+3)\,dx = \frac{1}{2}\int 2\,ln(2x+3)\,dx\]We can then use integration by substitution with \(u = 2x+3\) to give:
\[\begin{aligned} \frac{1}{2}\int 2\,ln(2x+3)\,dx &= \frac{1}{2}\int ln\,u\,du \\\ &= \frac{1}{2}\,u(ln\,u - 1) + C \\\ \end{aligned}\]Finally, we can substitute \(u = 2x + 3\) back into this answer to remove the variable \(u\) and therefore evaluate the original integral:
\[\int ln(2x+3)\,dx = \frac{2x+3}{2}\,(ln (2x+3) - 1) + C\]Example 2:
Calculate the definite integral of \(f(x) = 2x(1+x^2)^3\) from \(x=0\) to \(x=1\)
Solution:
Looking at our integral, \(\int_0^1 2x(1+x^2)^3\,dx\) we can see that \(2x\) is the derivative of \(1 + x^2\), and therefore we can use \(u = 1 + x^2\)
While we don’t need to make any changes to what is being integrated in this example, because we are changing the variables in the integral we do need to change the limits of the integral so that they are related to the new variable \(u\). We do this by finding the value of \(u\) at the given limits, which in this example is at \(x=0\) and \(x=1\)
So, at \(x=0\):
\[\begin{aligned} u &= 1+(0)^2 \\\ &= 1 \\\ \end{aligned}\]And, at \(x=1\):
\[\begin{aligned} u &= 1+(1)^2 \\\ &= 2 \\\ \end{aligned}\]Therefore our integral, after substitution, is now:
\[\int_1^2\,u^3\, du\]Now we can calculate the definite integral:
\[\begin{aligned} \int_1^2\,u^3\, du &= \frac{(2)^4}{4} - \frac{(1)^4}{4} \\\ &= \frac{16}{4} - \frac{1}{4} \\\ &= \frac{15}{4} \\\ \end{aligned}\]Check your understanding of integration by substitution by working through the questions below:
If we let \(u = x^2,\) this has the derivative \(2x\) and hence the integral is in the required form to use integration by substitution as follows:
\[\begin{aligned} \int 2xe^{x^2}\,dx &= \int e^u du \\\ &= e^u + C \\\ &= e^{x^2} + C \\\ \end{aligned}\]If we let \(u = x^2 + 1,\) this has the derivative \(2x\) and hence the integral is in the required form to use integration by substitution. However, we do need to change the limits from \(x=0\) to \(u=1\) and from \(x=1\) to \(u=2.\) We can then evaluate the integral as follows:
\[\begin{aligned} \int_0^1 \frac{2x}{(x^2 + 1)^2}\,dx &= \int_1^2 \frac{1}{u^2}\,du \\\ &= \int_1^2 u^{(-2)}\,du \\\ &= [\frac{u^{-1}}{-1}]_1^2 \\\ &= [-\frac{1}{u}]_1^2 \\\ &= -(\frac{1}{2} - \frac{1}{1}) \\\ &= - \frac{1}{2} + 1 \\\ &= \frac{1}{2} \end{aligned}\]We can use \(u = 1 + cos\,x,\) however since this has the derivative \(-sin\,x\) we need to rewrite the integral as:
\[-\int_0^{\frac{\pi}{2}} \frac{-sin\,x}{1 + cos\,x} dx\]We also need to rewrite the defined limits in terms of \(u\):
\[\begin{aligned} u &= 1 + cos\,0 \\\ &= 2 \end{aligned}\] \[\begin{aligned} u &= 1 + cos\,\frac{\pi}{2} \\\ &= 1 \end{aligned}\]Therefore, the integral can be evaluated as follows:
\[\begin{aligned} \int_0^{\frac{\pi}{2}} \frac{sin\,x}{1 + cos\,x} dx &= -\int_0^{\frac{\pi}{2}} \frac{-sin\,x}{1 + cos\,x}\,dx \\\ &= - \int_2^1 \frac{1}{u}\,du \\\ &= \int_1^2 \frac{1}{u}\,du \\\ &= ln\,2 - ln 1 \\\ &= ln\,2 \\\ \end{aligned}\]When we have the product of two functions, we can use integration by parts to find the integral. In order to understand how integration by parts works, we need to think back to derivatives and specifically to the product rule. This says that if we have:
\[y\,=\,f(x)\,\times\,g(x)\]then the derivative will be:
\[\frac{dy}{dx}\,=\,g(x)\,\times\,f'(x)\;+\;f(x)\,\times\,g'(x)\]If we rewrite the above formula using integration notation, we know that this must also be true:
\[f(x)\,\times\,g(x) = \int\,(g(x)\,\times\,f'(x)\;+\;f(x)\,\times\,g'(x))\,dx\]This can also be written as:
\[f(x)\,\times\,g(x) = \int\,g(x)\,\times\,f'(x)\, dx + \int\,f(x)\,\times\,g'(x)\,dx\]When we rearrange this we get the formula for integration by parts:
\[\int\,f(x)\,\times\,g'(x)\,dx = f(x)\,\times\,g(x) - \int\,g(x)\,\times\,f'(x)\, dx\]where \(f(x)\) and \(g(x)\) are two functions, \(f'(x)\) is the derivative of \(f(x)\) and \(g'(x)\) is the derivative of \(g(x)\)
Example 1:
Find \(\int\,x\,sin\,x\,dx\)
Solution:
To evaluate this we need:
\[\int\,x\,sin\,x\,dx = \int\,f(x)\,\times\,g'(x)\,dx\]So let \(f(x) = x\) and \(g'(x) = sin\,x,\) which means \(f'(x) = 1\) and \(g(x) = -\,cos\,x.\) Our indefinite integral can then be evaluated in parts as follows:
\[\begin{aligned} \int\,x\,sin\,x\,dx &= x(-cos\,x) - \int(-cos\,x)\,dx \\\ &= -x\,cos\,x + \int cos\,x\,dx \\\ &= -x\,cos\,x + sin\,x + C \\\ \end{aligned}\]Example 2:
Evaluate \(\int_0^{\pi} x^2\,cos\,x\,dx\)
Solution:
Let \(f(x) = x^2\) and \(g'(x) = cos\,x,\) which means \(f'(x) = 2x\) and \(g(x) = sin\,x.\) Our definite integral can then be rewritten as follows:
\[\int_0^{\pi}\,x^2\,cos\,x\,dx = [x^2\,sin\,x]_0^{\pi} - \int_0^{\pi}\,2x\,sin\,x\,dx\]Note that since we don’t need to find the integral of \(x^2\,sin\,x\), we use square brackets with the limits to denote that we still need calculate this part of the formula at those values of \(x\). Doing this gives:
\[\begin{aligned} \,[x^2\,sin\,x]_0^{\pi} &= {\pi}^2 \times sin(\pi) - 0^2 \times sin\,(0) \\\ &= 0 \\\ \end{aligned}\]Next we need to integrate the second half of our formula \(\int_0^{\pi}\,2x\,sin\,x\,dx,\) which we can do using integration by parts again. This time let \(f(x) = 2x\) and \(g'(x) = sin\,x,\) so \(f'(x) = 2\) and \(g(x) = - cos\,x\) and we have:
\[\begin{aligned} \int_0^{\pi}\,2x\,sin\,x\,dx &= [-2x\,cos\,x]_0^{\pi} - \int_0^{\pi} -2\,cos\,x\,dx \\\ &= -[2x\,cos\,x]_0^{\pi} + 2\,\int_0^{\pi}\,cos\,x\, dx \\\ \end{aligned}\]Now we calculate \(-[2x\,cos\,x]_0^{\pi}\) as follows:
\[\begin{aligned} -[2x\,cos\,x]_0^{\pi} &= -2(\pi)\,cos\,(\pi) - -2(0)\,cos\,(0) \\\ &= 2 \pi \\\ \end{aligned}\]Next we calculate the second half of this integral:
\[\begin{aligned} 2 \int_0^{\pi}\,cos\,x\,dx &= 2(sin\,(\pi) - sin\,(0)) \\\ &= 0 \\\ \end{aligned}\]Therefore we have established that the second half of our original integral is:
\[\begin{aligned} \int_0^{\pi}\,2x\,sin\,x\,dx &= 2 \pi + 0 \\\ &= 2 \pi \\\ \end{aligned}\]Finally, we can use all of this to calculate the answer to our original integral:
\[\begin{aligned} \int_0^{\pi} x^2\,cos\,x\,dx &= [x^2\,sin\,x]_0^{\pi} - \int_0^{\pi}\,2x\,sin\,x\,dx \\\ &= 0 - 2 \pi \\\ &= -2 \pi \\\ \end{aligned}\]Check your understanding of integration by parts by working through the questions below:
Let \(f(x) = x\) and \(g'(x) = e^{2x},\) which means \(f'(x) = 1\) and \(g(x) = \frac{e^{2x}}{2}\)
So using our integration by parts formula, we have:
\[\begin{aligned} \int xe^{2x}\,dx &= \frac{xe^{2x}}{2} - \int \frac{e^{2x}}{2} \\\ &= \frac{xe^{2x}}{2} - \frac{e^{2x}}{4} + C \\\ &= \frac{e^{2x}}{4} (2x - 1) + C \\\ \end{aligned}\]Let \(f(x) = x\) and \(g'(x) = e^x,\) which means \(f'(x) = 1\) and \(g(x) = e^x\)
So using our integration by parts formula, we have:
\[\begin{aligned} \int_0^1 xe^x\,dx &= [xe^x]_0^1 - \int_0^1 e^x\,dx \\\ &= (1e^1 - 0 \times e^0) - (e^1 - e^0) \\\ &= e - (e - 1) \\\ &= 1 \end{aligned}\]Let \(f(x) = ln\,x\) and \(g'(x) = x^2,\) which means \(f'(x) = \frac{1}{x}\) and \(g(x) = \frac{x^3}{3}\)
So using our integration by parts formula, we have:
\[\begin{aligned} \int x^2\,ln\,x\,dx &= \frac{x^3\,ln\,x}{3} - \int \frac{x^2}{3} \\\ &= \frac{x^3\,ln\,x}{3} - \frac{x^3}{9} + C\\\ \end{aligned}\]Differential equations are an important concept in calculus as they can be used to describe how things change over time or space. For example, differential equations can be used to model changes in the speed of an object, the changing size of a population, changes in the number of people infected with a disease, how temperature changes as heat spreads in an object, and more.
However, while they are very good at expressing these changes, differential equations on their own are generally difficult to use. For this reason it is good to have an understanding of how to solve them, and this page covers one such technique.
In brief, it covers the following:
and while this can be tricky, this page covers a technique to solve differential equations that are in a certain form. First, though, we look at what exactly differential equations are, and the different types.
A differential equation is an equation that involves one or more derivatives. For example, the following are all differential equations:
\[\begin{aligned} \frac{dy}{dx} &= 4x + 5 \\\ \frac{dP}{dt} &= rP(1-\frac{P}{k}) \\\ 4x^2\cos\,y\,\frac{dy}{dx} &= 10 \\\ 7\,\frac{d^2x}{dt^2} + 2\,\frac{dx}{dt} + 2x &= \frac{4}{t^2} \\\ \end{aligned}\]In particular, these are all examples of what are called ordinary differential equations, as they each only contain derivatives taken with respect to one variable (that is, they only contain derivatives with respect to \(x\) or \(t\) but not both). If a differential equation contains derivatives with respect to more than one variable these are partial derivatives and the equation is a partial differential equation, but these are not covered here.
Differential equations also differ in terms of their order and degree. The order of a differential equation refers to the highest derivative contained in the equation. If it is a first derivative then it is referred to as a first order differential equation, if it is a second derivative it is a second order differential equation, and so on. For example, the first three differential equations above are first order differential equations, while the fourth one is a second order differential equation.
The degree of a differential equation is the exponent of the highest derivative in the equation. For example, the following differential equation is a second degree differential equation (actually it is a first order second degree ordinary differential equation):
\[(\frac{dy}{dx})^2 + 2y = 3x^3\]The differential equation below, on the other hand, is only a first degree differential equation as its highest derivative does not have an exponent (in fact it is a second order first degree ordinary differential equation).
\[\frac{d^2y}{dx^2} - (\frac{dy}{dx})^3 = 4x\]In this page we will look at a method of solving first order first degree differential equations only.
Finally, a special kind of first order differential equation is a linear differential equation, which is a first order differential equation in the following form (where \(p(x)\) and \(q(x)\) are functions of \(x\)):
\[\frac{dy}{dx} + p(x)y = q(x)\]Test your understanding of the different types of differential equations by working through the questions below:
This is a second order differential equation, as the highest derivative is a second derivative.
This is a second degree differential equation, as the highest derivative has an exponent of \(2.\)
This is a second order second degree ordinary differential equation.
No, because it contains a \(y^3\) instead of just \(y.\)
Just as there are many different types of differential equations, there are also many different ways to solve them - if indeed they can be solved at all. While some of these methods are very complex, one of the simplest methods is a technique called separation of variables. This technique can be used when the differential equation is separable, that is, when it can be written in the form:
\[f(y)\,\frac{dy}{dx} = g(x)\]If it can be written in this form, then the differential equation can be rearranged as follows:
\[f(y)\,dy = g(x) dx\]We can then integrate both sides of the equation to solve for \(y\):
\[\int f(y)\,dy = \int g(x)\,dx\]Note that if you are provided with an initial condition, such as the value of \(y\) when \(x\) is equal to a certain value, then you can substitute these values into the solution to find the constant of integration. Otherwise, you can leave it as part of the solution.
Example 1:
Solve \(2y\,\frac{dy}{dx} = 4x - 5\)
Solution:
This equation is in the form \(f(y)\,\frac{dy}{dx} = g(x),\) so we can rearrange it and then integrate as follows:
\[\begin{aligned} 2y\,\frac{dy}{dx} &= 4x - 5 \\\ \therefore \int 2y\,dy &= \int (4x - 5)\,dx \\\ \therefore y^2 &= 2x^2 - 5x + C \\\ \therefore y &= \sqrt{2x^2 - 5x + C} \\\ \end{aligned}\]Example 2:
Solve \(\frac{dy}{dx} = \frac{3x^2(4x + 1)}{2y}\) given that when \(x = 1,\) \(y = 6\)
Solution:
This equation is in the form \(f(y)\,\frac{dy}{dx} = g(x),\) so we can rearrange it and then integrate as follows:
\[\begin{aligned} \frac{dy}{dx} &= \frac{3x^2(4x + 1)}{2y} \\\ \therefore \int 2y\,dy &= \int 3x^2(4x + 1)\,dx \\\ \therefore \int 2y\,dy &= \int (12x^3 + 3x^2)\,dx \\\ \therefore y^2 &= 3x^4 + x^3 + C\\\ \therefore y &= \sqrt{3x^4 + x^3 + C} \\\ \end{aligned}\]Given that when \(x = 1\) we have \(y = 6,\) it follows that:
\[\begin{aligned} 6 &= \sqrt{1 + 1 + C} \\\ \therefore 6 &= \sqrt{2 + C} \\\ \therefore 36 &= 2 + C \\\ \therefore C &= 34 \\\ \end{aligned}\]So the solution to the differential equation is \(y = \sqrt{3x^4 + x^3 + 34}\)
Test your knowledge of the separation of variables technique by using it to solve the differential equations below:
Note we can write this as \(y = Ce^{2x^2}\) as the exponent laws tell us we can rewrite \(e^{2x^2 + C}\) as \(e^{2x^2}.e^C,\) and \(e^C\) is just another constant.
Note we can write this as \(y = Ce^{x^2 + x}\) as the exponent laws tell us we can rewrite \(e^{x^2 + x + C}\) as \(e^{x^2 + x}.e^C,\) and \(e^C\) is just another constant.
Given that when \(x = 0\) we have \(y = 5,\) it follows that:
\[\begin{aligned} 5 &= ln\,C \\\ \therefore C &= e^5 \\\ \end{aligned}\]So the solution to the differential equation is \(y = ln(2x^4 + e^5)\)
We can integrate the left hand side of this equation using integration by substitution where we set \(u = y - 4.\) This gives:
\[\begin{aligned} \int \frac{1}{u}\,du &= ln\,|u|\,\\\ &= ln\,|y - 4|\,\\\ \end{aligned}\]And so, using the logarithm laws, we have:
\[\begin{aligned} \int \frac{1}{y-4}\,dy &= \int \frac{2}{x}\,dx\\\ \therefore ln\,|y - 4|\, &= 2\,ln\,|x|\, + ln\,C \\\ \therefore ln\,|y - 4|\, &= ln\,|x^2|\, + ln\,C \\\ \therefore ln\,|y - 4|\, &= ln\,|Cx^2|\, \\\ \therefore y - 4 &= Cx^2 \\\ \therefore y &= Cx^2 + 4\\\ \end{aligned}\]Finally, given that when \(x = 3\) we have \(y = 22,\) it follows that:
\[\begin{aligned} 22 &= 9C + 4 \\\ \therefore 9C &= 18 \\\ \therefore C &= 2 \\\ \end{aligned}\]So the solution to the differential equation is \(y = 2x^2 + 4\)
In calculus, we commonly encounter two different types of quantities: scalars and vectors.
Scalar quantities are those that can be described by their magnitude (or size) alone, and are therefore represented by single numbers. For example, if we say it is \(30^{\circ} C\) outside, we have a pretty clear idea of how warm the weather is. Other examples of scalar quantities are \(40\textrm{km/hr}\), \(5\textrm{kg}\) and \(15\textrm{minutes.}\) This is because speed, mass, and time are all scalar quantities. In other words, scalars only tell us “how much” without including any kind of direction.
Vectors are quantities that have both a magnitude and a direction. For example, if we say a car is travelling at \(60\textrm{km/hr}\) to the north, or that someone has moved \(5\textrm{m}\) to the right, these are vector quantities as we are providing both a magnitude and a direction.
This page looks at how to perform various calculations involving vectors.
In brief, it covers the following:
First, though, we look at how to represent and label vectors in diagrams.
A vector can be represented in a diagram as an arrow between two points, with the length of the arrow indicating the magnitude, and the direction it points showing where it is headed. We can then label the vector using either a single lower case letter, usually in bold, or using the names of the points at either end with an arrow above. For example, the vector shown below in green is going from A (its initial point) to B (its terminal point) and could be labelled as \(\mathbf{a}\) or as \(\overrightarrow{AB}.\)

If two vectors have the same magnitude and direction they are called equivalent or equal vectors.
We can add vectors together on a diagram using the nose to tail method (also known as the triangle law).
The nose to tail method says that if two vectors are positioned so that the initial point of one is at the terminal point of another, then we can add the two vectors together to get the displacement vector.
Example: Suppose a person has walked from point A to point B, then changed direction and walked from point B to another point, C:

If we label these vectors \(\mathbf{u}\) and \(\mathbf{v}\), where \(\mathbf{u} = \overrightarrow{AB}\) and \(\mathbf{v} = \overrightarrow{BC},\) what is the displacement vector indicating the distance and direction the person is from their starting point?

Solution: Since the initial point of \(\mathbf{v}\) is at the terminal point of \(\mathbf{u}\), our displacement vector will be \(\mathbf{u} + \mathbf{v}\)

Subtracting vectors on a diagram is done in a similar way. All we need to do is reverse the direction of the vector we want to subtract, and then add as normal. This however means that the addition becomes a subtraction since we would have \(\mathbf{u} + (-\mathbf{v})\) which is the same as \(\mathbf{u} - \mathbf{v}\).

It can be difficult to represent vectors accurately using diagrams, and therefore they are generally written using coordinates in order to actually perform calculations. One way of doing this is to split a vector into parts by looking at its \(x\) and \(y\) components, otherwise known as the Cartesian coordinates (for more on this, and on using polar coordinates instead, see converting between coordinates). A vector’s \(x\) component is how many units ‘long’ it is in relation to the \(x\)-axis, and its \(y\) component is how many units ‘high’ it is in relation to the \(y\)-axis.
If we have vector \(\mathbf{v}\), its components can be written as \(\mathbf{v_x}\) and \(\mathbf{v_y}\). These components are then expressed in the form \(\mathbf{v}=(\mathbf{v}_x, \mathbf{v}_y),\) similar to the coordinates of a graph, or as \(\begin{pmatrix} \mathbf{v}_x \\ \mathbf{v}_y \end{pmatrix}\)

Example:
What are the components of the vectors shown below?

Solution:
Vector \(\mathbf{a}\) begins at \((0,0)\) and ends at \((2,4)\) therefore we have \(\mathbf{a} = (2,4)\)
Vector \(\mathbf{b}\) begins at \((1,3)\) and ends at \((4,8)\). To find the components of \(\mathbf{b}\), we first have to find the difference between the coordinates of these points:
\[\begin{aligned} \mathbf{b}_x &= 4 - 1 \\\ &= 3 \\\ \mathbf{b}_y &= 8 - 3 \\\ &= 5 \\\ \end {aligned}\]Therefore, the components for \(\mathbf{b}\) will be \(\mathbf{b} = (3,5)\)
Once we write vectors using components, in order to add or subtract them all we need to do is add or subtract the respective \(x\) and \(y\) components to find the components of the new vector.
Example:
Add the two vectors below to find the displacement vector:

Solution:
The displacement vector’s components will be:
\[\begin{aligned} \mathbf{u} + \mathbf{v} &= (8+6,\,5+(-2)) \\\ &=(14,\,3) \\\ \end{aligned}\]Check your understanding of adding and subtracting vectors by working through the questions below:
\(\begin{aligned} \mathbf{a} + \mathbf{b} &= (3 + 4,\,5+(-7))\\\ &= (7, -2) \\\ \end{aligned}\)
\(\begin{aligned} \mathbf{c} - \mathbf{d} &= (12 - 7, -3 - 2)\\\ &= (5, -5) \\\ \end{aligned}\)
\(\begin{aligned} \mathbf{y} - \mathbf{x} + \mathbf{z} &= (8 - 2 + 7, -3 - 3 + 4)\\\ &= (13, -2) \\\ \end{aligned}\)
As we know, vectors have both a magnitude and a direction. If we have a vector \(\mathbf{u}\), the magnitude of that vector is written as \(\vert \mathbf{u} \vert,\) or sometimes as \(\Vert \mathbf{u} \Vert\) so that it isn’t confused with the symbol for absolute value.
The magnitude of a vector is different to the components of a vector, as the magnitude is the numeric value of the vector. However, we can find the magnitude of a vector given its components using Pythagoras’ theorem.
The magnitude of a vector \(\mathbf{u} = (\mathbf{u}_x , \mathbf{u}_y)\) will be:
\[\vert \mathbf{u} \vert = \sqrt{\mathbf{u_x}^2 + \mathbf{u_y}^2}\]Example:
Find the magnitude of \(\mathbf{v} = (6,\,8)\)
Solution:
\[\begin{aligned} \vert \mathbf{v} \vert &= \sqrt{\mathbf{v_x}^2 + \mathbf{v_y}^2} \\\ &= \sqrt{6^2 + 8^2} \\\ &= \sqrt{100} \\\ &= 10 \\\ \end{aligned}\]If a vector has a magnitude of \(1\) it is called a unit vector. There are two commonly known unit vectors that are often used in vector notation. The unit vectors are \(\mathbf{i}\) and \(\mathbf{j}\) and they sit along the \(x\) and \(y\) axes, respectively:

Vectors can also be represented using these unit vectors, for example as \(\mathbf{v} = x\mathbf{i} + y\mathbf{j}\)
Check your understanding of the magnitude of vectors and unit vector notation by working through the questions below:
\(\begin{aligned} \vert \mathbf{a} \vert &= \sqrt{\mathbf{a_x}^2 + \mathbf{a_y}^2} \\\ &= \sqrt{4^2 + (-3)^2} \\\ &= \sqrt{25} \\\ &= 5 \\\ \end{aligned}\)
\(\begin{aligned} \vert \mathbf{b} \vert &= \sqrt{\mathbf{b_x}^2 + \mathbf{b_y}^2} \\\ &= \sqrt{(-7)^2 + 5^2} \\\ &= \sqrt{74} \\\ &= 8.602 \\\ \end{aligned}\)
\(\begin{aligned} \vert \mathbf{c} \vert &= \sqrt{\mathbf{c_x}^2 + \mathbf{c_y}^2} \\\ &= \sqrt{4^2 + (-2)^2} \\\ &= \sqrt{20} \\\ &= 4.47 \\\ \end{aligned}\)
Vectors can be multiplied by scalar quantities in order to scale them up or down. To multiply a vector by a scalar, all we need to do is multiply each of the vector’s components by the scalar.
If we have a vector \(\mathbf{u}\), the scaled vector will be \(k\mathbf{u}\) where \(k\) is the scalar and \(\mathbf{u}\) is the vector.
Example 1:
Multiply the vector \(\mathbf{f} = (9,3)\) by \(4\)
Solution:
\[\begin{aligned} 4 \mathbf{f} &= (4 \times 9 ,\,4 \times 3) \\\ &= (36, 12) \\\ \end{aligned}\]Example 2:
Calculate \(2.5 \mathbf{u}\) when \(\mathbf{u} = (5, 8)\)
Solution:
\[\begin{aligned} 2.5 \mathbf{u} &= (2.5 \times 5,\,2.5 \times 8) \\\ &= (12.5, 20) \\\ \end{aligned}\]Check your understanding of calculating scalar multiples by working through the questions below:
\(\begin{aligned} 3 \mathbf{a} &= (3 \times 7,\,3 \times -6) \\\ &= (21, -18) \\\ \end{aligned}\)
\(\begin{aligned} 7 \mathbf{b} &= (7 \times -3) \mathbf{i} + (7 \times 4) \mathbf{j} \\\ &= -21 \mathbf{i} + 28 \mathbf{j} \\\ \end{aligned}\)
\(\begin{aligned} 3 \mathbf{c} - 4 \mathbf{d} &= (3 \times 12 - 4 \times (-3)) \mathbf{i} + (3 \times 3 - 4 \times 5) \mathbf{j} \\\ &= (36 + 12) \mathbf{i} + (9 - 20) \mathbf{j} \\\ &= 48 \mathbf{i} - 11 \mathbf{j} \\\ \end{aligned}\)
So far we have been using Cartesian coordinates to express vectors in terms of their \(x\) and \(y\) components, but they can also be expressed using polar coordinates. This is when we state the magnitude and direction instead (note that the direction is stated using an angle either in degrees or in radians - we will use degrees here). For example, we could write a vector \(\mathbf{v}\) as \((12, 30^\circ)\) using polar coordinates.
To convert between Cartesian and polar coordinates we need to use trigonometry. In particular, to convert from Cartesian coordinates to polar coordinates we use Pythagoras’ theorem to calculate the magnitude and the tangent trigonometric ratio to calculate the direction.
To write the vector \(\mathbf{a} = (\mathbf{a}_x, \mathbf{a}_y)\) using polar coordinates \((r, \theta)\) we calculate:
\[r = \sqrt{\mathbf{a_x}^2 + \mathbf{a_y}^2}\] \[\theta = \tan^{-1}\frac{a_y}{a_x}\]Example:
Write \(\mathbf{a} = (10, 4)\) using polar coordinates rounded to two decimal places.
Solution:
\[\begin{aligned} r &= \sqrt{\mathbf{a_x}^2 + \mathbf{a_y}^2} \\\ &= \sqrt{10^2 + 4^2} \\\ &= \sqrt{116} \\\ &= 10.77 \\\ \end{aligned}\] \[\begin{aligned} \theta &= \tan^{-1}\frac{a_y}{a_x} \\\ &= \tan^{-1}\frac{4}{10} \\\ &= 21.80^\circ \end{aligned}\]Therefore \(\mathbf{a} = (10.77,\,21.80^\circ)\)
To convert from polar coordinates to Cartesian coordinates we use the sine and cosine trigonometric ratios.
To write the vector \(\mathbf{b} = (r, \theta)\) using Cartesian coordinates \((\mathbf{b}_x, \mathbf{b}_y)\) we calculate:
\[\mathbf{b}_x = r\,cos\,\theta\] \[\mathbf{b}_y = r\,sin\,\theta\]Example:
Write \(\mathbf{b} = (25, 30^\circ)\) using Cartesian coordinates rounded to two decimal places.
Solution:
\[\begin{aligned} \mathbf{b}_x &= r\,cos\,\theta \\\ &= 25\,cos\,30^\circ \\\ &= 21.65 \\\ \end{aligned}\] \[\begin{aligned} \mathbf{b}_y &= r\,sin\,\theta \\\ &= 25\,sin\,30^\circ \\\ &= 12.5 \\\ \end{aligned}\]Therefore \(\mathbf{b} = (21.65, 12.5)\)
Check your understanding of how to convert between coordinates by working through the questions below:
Therefore \(\mathbf{u} = (12.37,\,14.04^\circ)\)
Therefore \(\mathbf{v} = (6.36,\,12.47)\)
Therefore the vector can be expressed as \((-2.46\textrm{m},\,1.72\textrm{m})\)
If we want to multiply two vectors together, rather than just multiplying a vector by a scalar, there are two different ways of doing this. One method, known as the dot product, produces a scalar result, while the other method, known as the cross product, produces a vector result. While the cross product is not covered here, how to calculate the dot product is detailed below.
The dot product of two vectors \(\mathbf{a}\) and \(\mathbf{b}\) is written as:
\[\mathbf{a} . \mathbf{b}\]This can be calculated in two different ways, depending if the vectors are written using Cartesian or polar coordinates. If the vectors are written using Cartesian coordinates, we multiple the two \(x\) components together and the two \(y\) components together and then add the results.
The dot product of two vectors written using Cartesian coordinates is:
\[\mathbf{a} . \mathbf{b} = \mathbf{a}_x \times \mathbf{b}_x + \mathbf{a}_y \times \mathbf{b}_y\]Example:
Calculate \(\mathbf{a} . \mathbf{b}\) given that \(\mathbf{a} = (-2, 4)\) and \(\mathbf{a} = (3, 5)\)
Solution:
\[\begin{aligned} \mathbf{a} . \mathbf{b} &= \mathbf{a}_x \times \mathbf{b}_x + \mathbf{a}_y \times \mathbf{b}_y \\\ &= -2 \times 3 + 4 \times 5 \\\ &= -6 + 20 \\\ &= 14 \\\ \end{aligned}\]If the vectors are written using polar coordinates, we multiply the magnitude of each vector together and then multiply by the cosine of the angle between them.
The dot product of two vectors written using polar coordinates is:
\[\mathbf{a} . \mathbf{b} = \vert \mathbf{a} \vert \times \vert \mathbf{b} \vert \times cos\,\theta\]where \(\theta\) is the angle between the two vectors.
Example:
Calculate \(\mathbf{a} . \mathbf{b}\) given that \(\mathbf{a} = (4, 45^\circ)\) and \(\mathbf{b} = (7, 105^\circ)\)
Solution:
The angle between the two vectors is \(105^\circ - 45^\circ = 60^\circ,\) so:
\[\begin{aligned} \mathbf{a} . \mathbf{b} &= \vert \mathbf{a} \vert \times \vert \mathbf{b} \vert \times cos\,\theta \\\ &= 4 \times 7 \times cos\,60^\circ \\\ &= 28 \times 0.5 \\\ &= 14 \\\ \end{aligned}\]Check your understanding of using the dot product to multiply vectors by working through the questions below:
The angle between the two vectors is \(75^\circ - 22^\circ = 53^\circ,\) so:
\[\begin{aligned} \mathbf{u} . \mathbf{v} &= \vert \mathbf{u} \vert \times \vert \mathbf{v} \vert \times cos\,\theta \\\ &= 3 \times 8 \times cos\,53^\circ \\\ &= 24 \times 0.602 \\\ &= 14.44 \\\ \end{aligned}\]From question 2 above, we have: \(\mathbf{c} . \mathbf{d} = 33\)
Furthermore, calculating the magnitude of the vectors gives:
\[\begin{aligned} \vert \mathbf{c} \vert &= \sqrt{\mathbf{c_x}^2 + \mathbf{c_y}^2} \\\ &= \sqrt{6^2 + 7^2} \\\ &= \sqrt{85} \\\ &= 9.22 \\\ \end{aligned}\] \[\begin{aligned} \vert \mathbf{d} \vert &= \sqrt{\mathbf{d_x}^2 + \mathbf{d_y}^2} \\\ &= \sqrt{9^2 + (-3)^2} \\\ &= \sqrt{90} \\\ &= 9.49 \\\ \end{aligned}\]So we have:
\[\begin{aligned} \vert \mathbf{u} \vert \times \vert \mathbf{v} \vert \times cos\,\theta &= 33\\\ \therefore 9.22 \times 9.49 \times cos\,\theta &= 33 \\\ \therefore cos\,\theta &= 0.38 \\\ \therefore \theta &= cos^{-1}0.38 \\\ \therefore \theta &= 67.83^\circ \\\ \end{aligned}\]So the angle between the two vectors is \(67.83^\circ\)
If you would like to provide feedback on this module please do so by answering some or all of the questions in the form below. Alternatively for any questions about the module please contact Library-UniSkills@curtin.edu.au
We review this feedback regularly, and take your suggestions on board to improve the module. Thank you for your feedback!
UniSkills was created and is maintained by Curtin University Library. To report issues with UniSkills contact Library Help.
Twemoji icons by Twitter, Inc and other contributors, licensed under a CC-BY 4.0 licence.
Except where otherwise noted, UniSkills content in all it’s forms (website, PDFs etc) are licensed under a Creative Commons Attribution ShareAlike 4.0 International Licence. We ask that you attribute any use of the content as created by Curtin University Library with a link to the Library website.
This license does not extend to other Curtin University and Curtin University Library webpages, or to Curtin branding and trademarks. Curtin University’s copyright information is available on the Curtin website.