##### Related Content

# Linear Approximation Calculator

*=*

**f(x)***=*

**x**_{0}

**L(x) = ...****Voovers+ Full Solution Steps Preview:**

## Linear Approximation Lesson

#### Lesson Contents

### What is Linear Approximation?

**Linear approximation is the process of simplifying a relatively complex function into a linear function that allows us to approximate f(x) when our x value is sufficiently close to a given value x_{0}**.

As we zoom in on the point *x*_{0}, we can see that the curvature of *f(x) *begins flattening out and looks more like the tangent line (red line).

This visualization helps us understand why approximations of *f(x) *are more accurate near *x*_{0}. If we keep zooming in on the graph, *f(x) *will eventually look like a straight line.

While linear approximation is effective at approximating a function near *x *= *x*_{0}, the accuracy of the result diminishes as you move farther away from *x*_{0}. If a higher degree of accuracy is desired, using higher order polynomials via polynomial approximation will generally yield better results when compared to linear approximation.

### Why do we Learn About Linear Approximation?

Linear approximation is more than just another topic in a mathematics class. It actually has many practical uses in the real world. **One example would be the use of linear approximation to estimate the number of sales a business will make at a point in the near future**.

Let’s say that you own a growing clothing brand that sells shirts with graphics on them and you want to know how many sales you might expect to see in the near future if business continues growing steadily.

If you know the number of shirts sold over two consecutive years in the past, you can use linear approximation to estimate sales at a later date. Let’s check out a basic example below:

Let’s say that you sold 350 shirts in 2020. In 2021, you sold 525 shirts. Using the following equation, you can estimate the number of shirts you will sell by the end of 2023.

$$\begin{align}& \text{Estimated Sales(at target year)} = \text{Sales(in 2021)} + \text{Change in Sales(from 2020 to 2021)((target year) – 2021)}\end{align}$$

NOTE: If you compare the above equation to the general equation found in the “How to Linearly Approximate a Function” section below, you can see that they have the same structure.

Plugging in our values we get:

$$\begin{align}& \text{Estimated Sales in 2023} = 525 + (525 \: – \: 350)((2023) \: – \: 2021) \\ \\ & \Longrightarrow \text{Estimated Sales in 2023} = 525 + 175(2) \\ \\ & \Longrightarrow \text{Estimated Sales in 2023} = 875 \text{ shirts}\end{align}$$

Having the ability to simplify relatively complex problems with the use of linear approximation is not only helpful in the sciences, it can also be helpful in business as well!

### How to Linearly Approximate a Function

We can linearly approximate a function by using the following equation:

$$\begin{align}& L(x) = f(x_{0}) + f'(x_{0})(x-x_{0}) \hspace{10ex} \textbf{ (1) }\end{align}$$

Where *x _{0}* is the given

*x*value,

*f(x*is the given function evaluated at

_{0})*x*, and

_{0}*f ‘(x*is the derivative of the given function evaluated at

_{0})*x*.

_{0}The steps for finding the Linear Approximation of function *f(x) *are as follows:

- Evaluate
*f(x)*at*x*to get_{0}*f(x*._{0}) - Take the derivative of
*f(x)*to get*f ‘(x).* - Evaluate
*f ‘(x)*at*x*to get_{0}*f ‘(x*._{0}) - Plug the values obtained from previous steps into the linear approximation equation (Equation 1) and simplify.

### Example Problem

## How the Calculator Works

The Linear Approximation Calculator is comprised of HTML, CSS, and JS.

HTML stands for “HyperText Markup Language”. HTML serves as the framework for the calculator. This allows us to create and name separate entities that will later be styled with CSS or told what to do with JS.

CSS stands for “Cascading Style Sheets”. CSS allows us to style various elements by changing their size, shape, color, etc. Everything from the on-screen calculator, to the solution steps fields have been styled using CSS.

JS stands for “JavaScript”. JS allows us to add functionality to the calculator. This is what gives the on-screen calculator buttons their functionality, as well as the calculator’s ability to perform the calculations required to return a solution to the user.

This all comes together to produce a custom answer, a complete set of detailed of solutions steps, and a helpful graph for the user based on their unique inputs.