#### • Class 11 Physics Demo

Explore Related Concepts

# Function Rule Calculator

Function Rule Calculator

May a times in real life we have situations as follows, for example: In a theater showing a play, 300 tickets are sold for  3000 dollars and 500 tickets are sold for 5000 dollars. What is the rule that defines the amount of money received for x number of tickets sold?

Another example: The following table gives  the population of a particular species of an organism:
Time(weeks)    0    1     2     3      4     5    6
Number           2    7    10    11    10    7    2

Find a formula that relates the time to the number of organisms.
In such situations we need to use the function rule calculator.
For the purpose of this article we shall limit ourselves to understanding how to calculate functions rules of linear and quadratic type only.

We shall understand better with the help of an example.

Example 1: Find a function rule that relates x to y as given in the table below:

X    Y
-5    0
-3    3
1     9

Solution: First let us plot those points to check what kind of a function we need. That is whether it has to be a linear or a quadratic function.

From the above graph we see that we are looking at finding a linear function.
The general form of a linear function is y = mx + b, where m is the slope and b is the y intercept.
From the table (or the graph) we have three ordered pairs of the form (x,y) which are (-5,0), (-3,3) and (1,9).
So if we plug any two of these three values into the general form of a linear function we have:
0 = m (-5) + b and 3 = m (-3) + b
Solving those two equations simultaneously for m and b we get,
m = 3/2, and b = 15/2
So our required function would be: y= mx + b = (3/2)x + 15/2

Example 2: Find a function to relate x and y as shown in table below:
X    Y
-2    5
-1    0
3     0
4     5

Solution: On plotting the points we have:

So this time we see that it is a quadratic curve. The general form of a quadratic curve is:
Y = ax2 + bx + c. Now if we plug in any of the three ordered pairs into that equation we have:
5 = a(-2)2 + b(-2) + c = 4a – 2b + c
0 = a(-1)2 + b(-1) + c = a – b + c and
0 = a(3)2 + b(3) + c = 9a + 3b + c
Solving those three equations for a, b and c we get, a = 1, b = -2 and c = -3. So the required function would be: y = x2 – 2x - 3

From Wikipedia

Slide rule

The slide rule, also known colloquially as a slipstick, is a mechanical analog computer. The slide rule is used primarily for multiplication and division, and also for functions such as roots, logarithms and trigonometry, but is not normally used for addition or subtraction.

Slide rules come in a diverse range of styles and generally appear in a linear or circular form with a standardized set of markings (scales) essential to performing mathematical computations. Slide rules manufactured for specialized fields such as aviation or finance typically feature additional scales that aid in calculations common to that field.

William Oughtred and others developed the slide rule in the 17th century based on the emerging work on logarithms by John Napier. Before the advent of the pocket calculator, it was the most commonly used calculation tool in science and engineering. The use of slide rules continued to grow through the 1950s and 1960s even as digital computing devices were being gradually introduced; but around 1974 the electronic scientific calculator made it largely obsolete and most suppliers left the business.

## Basic concepts

In its most basic form, the slide rule uses two logarithmic scales to allow rapid multiplication and division of numbers. These common operations can be time-consuming and error-prone when done on paper. More elaborate slide rules allow other calculations, such as square roots, exponentials, logarithms, and trigonometric functions.

Scales may be grouped in decades, which are numbers ranging from 1 to 10 (i.e. 10n to 10n+1). Thus single decade scales C and D range from 1 to 10 across the entire width of the slide rule while double decade scales A and B range from 1 to 100 over the width of the slide rule.

In general, mathematical calculations are performed by aligning a mark on the sliding central strip with a mark on one of the fixed strips, and then observing the relative positions of other marks on the strips. Numbers aligned with the marks give the approximate value of the product, quotient, or other calculated result.

The user determines the location of the decimal point in the result, based on mental estimation. Scientific notation is used to track the decimal point in more formal calculations. Addition and subtraction steps in a calculation are generally done mentally or on paper, not on the slide rule.

Most slide rules consist of three linear strips of the same length, aligned in parallel and interlocked so that the central strip can be moved lengthwise relative to the other two. The outer two strips are fixed so that their relative positions do not change.

Some slide rules ("duplex" models) have scales on both sides of the rule and slide strip, others on one side of the outer strips and both sides of the slide strip (which can usually be pulled out, flipped over and reinserted for convenience), still others on one side only ("simplex" rules). A sliding cursor with a vertical alignment line is used to find corresponding points on scales that are not adjacent to each other or, in duplex models, are on the other side of the rule. The cursor can also record an intermediate result on any of the scales.

## Operation

### Multiplication

A logarithm transforms the operations of multiplication and division to addition and subtraction according to the rules \log(xy) = \log(x) + \log(y) and \log(x/y) = \log(x) - \log(y). Moving the top scale to the right by a distance of \log(x), by matching the beginning of the top scale with the label x on the bottom, aligns each number y, at position \log(y) on the top scale, with the number at position \log(x) + \log(y) on the bottom scale. Because \log(x) + \log(y) = \log(xy), this position on the bottom scale gives xy, the product of x and y. For example, to calculate 3Ã—2, the 1 on the top scale is moved to the 2 on the bottom scale. The answer, 6, is read off the bottom scale where 3 is on the top scale. In general, the 1 on the top is moved to a factor on the bottom, and the answer is read off the bottom where the other factor is on the top.

Operations may go "off the scale;" for example, the diagram above shows that the slide rule has not positioned the 7 on the upper scale above any number on the lower scale, so it does not give any answer for 2Ã—7. In such cases, the user may slide the upper scale to the left until its right index aligns with the 2, effectively multiplying by 0.2 instead of by 2, as in the illustration below:

Here the user of the slide rule must remember to adjust the decimal point appropriately to correct the final answer. We wanted to find 2Ã—7, but instead we calculated 0.2Ã—7=1.4. So the true answer is not 1.4 but 14. Resetting the slide is not the only way to handle multiplications that would result in off-scale results, such as 2Ã—7; some other methods are:

1. Use the double-decade scales A and B.
2. Use the folded scales. In this example, set the left 1 of C opposite the 2 of D. Move the cursor to 7 on CF, and read the result from DF.
3. Use the CI inverted scale. Position the 7 on the CI scale above the 2 on the D scale, and then read the result off of the D scale, below the 1 on the CI scale. Since 1 occurs in two places on the CI scale, one of them will always be on-scale.
4. Use both the CI inverted scale and the C scale. Line up the 2 of CI with the 1 of D, and read the result from D, below the 7 on the C scale.

Method 1 is easy to understand, but entails a loss of precision. Method 3 has the advantage that it only involves two scales.

### Division

The illustration below demonstrates the computation of 5.5/2. The 2 on the top scale is placed over the 5.5 on the bottom scale. The 1 on the top scale lies above the quotient, 2.75. There is more than one method for doing division

Quotient rule

In calculus, the quotient rule is a method of finding the derivative of a function that is the quotient of two other functions for which derivatives exist.

If the function one wishes to differentiate, f(x), can be written as

f(x) = \frac{g(x)}{h(x)}

and h(x)\not=0, then the rule states that the derivative of g(x)/h(x) is

f'(x) = \frac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}.

More precisely, if all x in some open set containing the number a satisfy h(x)\not=0, and g'(a) and h'(a) both exist, then f'(a) exists as well and

f'(a)=\frac{g'(a)h(a) - g(a)h'(a)}{[h(a)]^2}.

And this can be extended to calculate the second derivative as well (you can prove this by taking the derivative of f(x)=g(x)(h(x))^{-1} twice). The result of this is:

f(x)=\frac{g(x)[h(x)]^2-2g'(x)h(x)h'(x)+g(x)[2[h'(x)]^2-h(x)h(x)]}{[h(x)]^3}.

The quotient rule formula can be derived from the the product rule and chain rule.

## Examples

The derivative of (4x - 2)/(x^2 + 1) is:

\begin{align}\frac{d}{dx}\left[\frac{(4x - 2)}{x^2 + 1}\right] &= \frac{(x^2 + 1)(4) - (4x - 2)(2x)}{(x^2 + 1)^2}\\

& = \frac{(4x^2 + 4) - (8x^2 - 4x)}{(x^2 + 1)^2} = \frac{-4x^2 + 4x + 4}{(x^2 + 1)^2}\end{align}

In the example above, the choices

g(x) = 4x - 2
h(x) = x^2 + 1

were made. Analogously, the derivative of sin(x)/x2 (when x&nbsp;â‰ &nbsp;0) is:

\frac{\cos(x) x^2 - \sin(x)2x}{x^4}

Another example is:

f(x) = \frac{2x^2}{x^3}

whereas g(x) = 2x^2 and h(x) = x^3, and g'(x) = 4x and h'(x) = 3x^2.

The derivative of f(x) is determined as follows:

f'(x) = \frac {\left(4x \cdot x^3 \right) - \left(2x^2 \cdot 3x^2 \right)} {\left(x^3\right)^2} = \frac{4x^4 - 6x^4}{x^6} = \frac{-2x^4}{x^6} = -\frac{2}{x^2}

This can be checked by using laws of exponents and the power rule:

f(x) = \frac{2x^2}{x^3} = \frac{2}{x} = 2x^{-1}
f'(x) = -2x^{-2} = -\frac{2}{x^2}

### Limitations

The quotient rule is not useful at points where either the numerator or denominator are not differentiable; it's possible that the quotient may be differentiable at such points. For example, consider the function:

f(x) = \frac,

where |x| denotes the absolute value of x. This is, of course, simply the function f(x)&nbsp;=&nbsp;1, so it is differentiable everywhere and in particular f'(0)&nbsp;=&nbsp;0. If we try to use the quotient rule to compute f'(0), however, an undefined value will result, since |x| is nondifferentiable at x&nbsp;=&nbsp;0.

## Proofs

### From Newton's difference quotient

Suppose f(x) = g(x)/h(x) where h(x) \neq 0 and g and h are differentiable.

f'(x) = \lim_{\Delta x \to 0} \frac{f(x + \Delta x)- f(x)}{\Delta x} = \lim_{\Delta x \to 0} \frac{\frac{g(x + \Delta x)}{h(x + \Delta x)} - \frac{g(x)}{h(x)}}{\Delta x}

We pull out the 1/\Delta x and combine the fractions in the numerator:

= \lim_{\Delta x \to 0} \frac{1}{\Delta x} \left(\frac{g(x+\Delta x)h(x)-g(x)h(x+\Delta x)}{h(x)h(x+\Delta x)} \right)

Adding and subtracting g(x)h(x) in the numerator:

= \lim_{\Delta x \to 0} \frac{1}{\Delta x} \left( \frac{g(x+\Delta x)h(x)-g(x)h(x)-g(x)h(x+\Delta x)+g(x)h(x)}{h(x)h(x+\Delta x)} \right)

We factor this and multiply the 1/\Delta x through the numerator:

= \lim_{\Delta x \to 0} \frac{\frac{g(x+\Delta x)-g(x)}{\Delta x}h(x)-g(x)\frac{h(x+\Delta x)-h(x)}{\Delta x}}{h(x)h(x+\Delta x)}

Now we move the limit through:

= \frac{\lim_{\Delta x \to 0} \left(\frac{g(x+\Delta x)-g(x)}{\Delta x}\right)h(x) - g(x) \lim_{\Delta x \to 0} \left(\frac{h(x+\Delta x)-h(x)}{\Delta x}\right)}{h(x)\lim_{\Delta x \to 0}h( x+\Delta x)}

By the definition of the derivative, the limits of difference quotients in the numerator are derivatives. The limit in the denominator is h(x) because differentiable functions are continuous. Thus we get:

= \frac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}

### Using the chain rule

Consider the identity

\frac{u}{v}\; =\; \frac{1}{4}\left[ \left( u+\frac{1}{v} \right)^{2}-\; \left( u-\frac{1}{v} \right)^{2} \right]

Then

\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{d}{dx}\frac{1}{4}\left[ \left( u+\frac{1}{v} \right)^{2}-\; \left( u-\frac{1}{v} \right)^{2} \right]

\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{1}{4}\left[ 2\left( u+\frac{1}{v} \right)\left( \frac{du}{dx}-\frac{dv}{v^{2}dx} \right)-\; 2\left( u-\frac{1}{v} \right)\left( \frac{du}{dx}+\frac{dv}{v^{2}dx} \right) \right]

\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{1}{4}\left[ \frac{4}{v}\frac{du}{dx}-\frac{4u}{v^{2}}\frac{dv}{dx} \right]

Finally, taking a common denominator leaves us with the expected result

\frac{d\left( \frac{u}{v} \right)}{dx}\; =\; \frac{\left[ v\frac{du}{dx}-u\frac{dv}{dx} \right]}{v^{2}}

### By total differentials

An even more elegant proof is a consequence of the law about total differentials, which states that the total differential,

dF = \frac{\partial F}{\partial x} dx + \frac{\partial F}{\partial y} dy + \frac{\partial F}{\partial z} dz + \cdots

of any function in any set of quantities is decomposable in this way, no matter what the independent variables in a function are (i.e., no matter which variables are taken so that they may not be expressed as functions of other variables). This means that, if N and D are both functions of an independent variable x, and F&nbsp;=&nbsp;N(x)/D(x), then it must be true both that

(*) \qquad dF = \frac{\partial F}{\partial x} \, dx

and that

dF = \frac{\partial F}{\partial N}dN + \frac{\partial F}{\partial D} \, dD.

But we know that dN = N'(x) dx and dD = D'(x) \, dx.

Substituting and setting these two total differentials equal to one another (since they represent limits which we can manipulate), we obtain the equation

\frac{\partial F}{\partial x} dx = \frac{\partial F}{\partial N}N'(x) dx + \frac{\partial F}{\partial D}D'(x) dx

which requires that

(\#) \qquad \frac{\partial F}{\partial x} = \frac{\partial F}{\partial N}N'(x) + \frac{\partial F}{\partial D}D'(x).

We compute the partials on the right:

\frac{

Scientific calculator

A scientific calculator is a type of electroniccalculator, usually but not always handheld, designed to calculate problems in science (especially physics), engineering, and mathematics. They have almost completely replaced slide rules in almost all traditional applications, and are widely used in both education and professional settings.

In certain contexts such as higher education, scientific calculators have been superseded by graphing calculators, which offer a superset of scientific calculator functionality along with the ability to graph input data and write and store programs for the device. There is also some overlap with the financial calculator market.

## Functions

Modern scientific calculators generally have many more features than a standard four or five-function calculator, and the feature set differs between manufacturers and models; however, the defining features of a scientific calculator include:

In addition, high-end scientific calculators will include:

While most scientific models have traditionally used a single-line display similar to traditional pocket calculators, many of them have at the very least more digits (10 to 12), sometimes with extra digits for the floating point exponent. A few have multi-line displays, with some recent models from Hewlett-Packard, Texas Instruments, Casio, Sharp, and Canon using dot matrix displays similar to those found on graphing calculators.

## Uses

Scientific calculators are used widely in any situation where quick access to certain mathematical functions is needed, especially those such as trigonometric functions that were once traditionally looked up in tables; they are also used in situations requiring back-of-the-envelope calculations of very large numbers, as in some aspects of astronomy, physics, and chemistry.

They are very often required for math classes from the junior high school level through college, and are generally either permitted or required on many standardized tests covering math and science subjects; as a result, many are sold into educational markets to cover this demand, and some high-end models include features making it easier to translate the problem on a textbook page into calculator input, from allowing explicit operator precedence using parentheses to providing a method for the user to enter an entire problem in as it is written on the page using simple formatting tools.

## History

The first scientific calculator that included all of the basic features above was the programmable Hewlett-PackardHP-9100A, released in 1968, though the Wang LOCI-2 and the Mathatronics Mathatron had some features later identified with scientific calculator designs. The HP-9100 series was built entirely from discrete transistor logic with no integrated circuits, and was one of the first uses of the CORDIC algorithm for trigonometric computation in a personal computing device, as well as the first calculator based on reverse Polish notation entry. HP became closely identified with RPN calculators from then on, and even today some of their high-end calculators (particularly the long-lived HP-12C financial calculator and the HP-48 series of graphing calculators) still offer RPN as their

Calculation

A calculation is a deliberate process for transforming one or more inputs into one or more results, with variable change.

The term is used in a variety of senses, from the very definite arithmetical calculation of using an algorithm to the vague heuristics of calculating a strategy in a competition or calculating the chance of a successful relationship between two people.

Multiplying 7 by 8 is a simple algorithmic calculation.

Estimating the fair price for financial instruments using the Black-Scholes model is a complex algorithmic calculation.

Statistical estimations of the likely election results from opinion polls also involve algorithmic calculations, but provide results made up of ranges of possibilities rather than exact answers.

To calculate means to ascertain by computing. The English word derives from the Latincalculus, which originally meant a small stone in the gall-bladder (from Latin calx). It also meant a pebble used for calculating, or a small stone used as a counter in an abacus (Latin abacus, Greekabax). The abacus was an instrument used by Greeks and Romans for arithmetic calculations, preceding the slide-rule and the electronic calculator, and consisted of perforated pebbles sliding on an iron bars.

Question:Pens are shipped to the office supply store in boxes of 12 each.. Write a function to calculate the total number of pens when you know the number of boxes.. Calculate the total number of pens in 16 boxes...

Answers:let x = number of boxes (x) = number of pens so (x) = 12x and (16) = 12(16) = 192 pens

Question:Again, I need a starter of implementing the Simpsons Rule 5 times of [0,1] interval on F(x) which is Integ(0,1 limits) (1 + 3x)^(x/2) dx How is h worked out and how to find the approximate value. All I require is a detailed formula and explanations the calculations I can work out for myself. Thanks

Answers:You will need to have n= 4, 6, 8, 10, and all even numbers. I will assume n=6, you can not assume n=5 because the formula will not work out. I will use Dx for change in x. do not confuse it with dx (the differential) Dx is a dx but it is for the x values, whereas dx is for the whole function. Simspon's Rule is (Dx)/3 [f(x0) + 4f(x1) + 2f(x2)+ 4(fx3) + 2(fx4) + ...+4f(xn-1) + f(xn)] the Dx is defind to be (b-a)/n, where b is the upper limit, a is the lower limit, and n in this case is 6. Dx= 1/6 First of all you need to find you intervals. Your intervals will be all the Xs + change in x. You begin with the lower limit and add the Dx. Your intervals are: [0,1/6], [1/6, 2/6], [2/6, 3/6], [3/6, 4/6], [4/6, 5/6], [5/6, 1] Sn= Dx/3 [f(0) + 4f(1/6) + 2f(2/6) + 4f(3/6) + 2f(4/6) + 4f(5/6) + f(1)]. Use calculator to approximate value. put (1 + 3x)^ (x-2) in y=screen. You can do it by hand but it will take too long. Do you see why n=5 will not work out your second to last term will be 2f(4/5), you could not use Sn with this and your answer would have been wrong. This is be a little difficult integral to do by hand, so I suggest you use the integral function which is #7 in 2nd + trace screen in TI-calculators.

Question:Given the following function. State the function rule. x: -1, 0, 1, 2 y: 5, 7, 9, 11 Rule: What is the value of the function at x = 10?: What is the value of the function at x = (-5): Given the following function. State the function rule. x: -1, 0, 1, 2 y: 3, 0, -3, -6 Rule: Evaluate f(10) Evaluate f(-5)

Answers:For the first one the rule is 2*x+7. You can get this by noticing that if x=0 then y=7 so you will need to have a +7 in the rule. Multiplying x by 2 first makes the rest make sense. Then at x=10 you have 2*10+7=27 and at x=-5 you have 2*(-5)+7=-3. For the second one the rule is (-3)*x. Notice that if x=0 then y=0 so you will need to have a +0 in the rule. Multiplying x by -3 makes the rest make sense. So then f(10)=(-3)*10=-30 and f(-5)=(-3)*(-5)=15.

Question:Harry started a new job in 2003. His salary was $31,000. At the beginning of the next year he will receive a raise of$1500. Assume he will receive the same raise every year. a. Write a function rule for finding Harry's salary after 2003. b. Find Harry's salary in 2008.

Answers:31000 + 1500x x= the number of years past 2003. 31000 + 1500 (5) = 38500