SOLUTION: 22,59,120,_,358. What is the missing number in the blank and how do we create a c++ program for this problem using virtual function??

Algebra.Com
Question 852459: 22,59,120,_,358.
What is the missing number in the blank and how do we create a c++ program for this problem using virtual function??

Answer by Edwin McCravy(20056)   (Show Source): You can put this solution on YOUR website!
Since we have 4 terms, we will assume a third degree 
polynomial for the nth term, because a third degree polynomial
has four coefficients.

That is, we assume a virtual function of the form

Y = A*N^3+B*N^2+C*N+D

Substitute these for (N,Y) (1,22), (2,59), (3,120), and (5,358)

    A*1^3+B*1^2+C*1+D = 22
    A*2^3+B*2^2+C*2+D = 22
    A*3^3+B*3^2+C*3+D = 22
    A*5^3+B*5^2+C*5+D = 358

And solve the augmented matrix:



We solve that matrix and get 

A = 1.83333333
B = 1
C = 21.16666667
D = -2

Then we substitute X=4 in

Y = A*N^3+B*N^2+C*N+D

and get 216.

Edwin

RELATED QUESTIONS

If tap A fills the tank in 10 hours, tap A empties the same tank in 22 hours. In what... (answered by richwmiller)
"Untitled," by Stephen Chen "I've often wondered how software is released and sold to... (answered by CPhill)
(c) Suppose n = 59 and p = 0.29. (For each answer, enter a number. Use 2 decimal places.) (answered by Boreal)
The profit P(x), generated after producing and selling x units of a product is given by... (answered by stanbon)
Exergaming in Canada. Exergames are active video games such as rhythmic dancing games,... (answered by CPhill)
I need help soving this problem, thanks. Your company would like to know how sales... (answered by solver91311)
A Basic Industries Corporation started a program which encourages its employees to... (answered by CPhill)
The numbers 1,2,3,4,5,6,7,8,9,10 are to be entered into the 10 boxes shown below, so that (answered by Edwin McCravy)
The numbers 1,2,3,4,5,6,7,8,9,10 are to be entered into the 10 boxes shown below, so that (answered by Edwin McCravy)