Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2009-01-11 04:41:18

Asakura
Member
Registered: 2007-12-07
Posts: 10

finding a function help

given when:
x=1, f(x)=5
x=2, f(x)=35
x=3, f(x)=245
x=4, f(x)=921

express f(x) in terms of x.

Offline

#2 2009-01-11 05:01:23

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: finding a function help

One way to find a function that will do this is to build it out of four others.
Consider this function:

It's clear that this function has roots at x=2, x=3 and x=4, so f(x) = 0 at those points.
Also, at x=1, the numerator of the fraction is the same as the denominator and so f(1) = 5.
This is the first part of the function you need.

The second part would look like this:

And the other two would be built similarly.

Once you have all four of those, you can add them together to get the function your question asks for.
It'll be messy, but you could tidy it into a standard cubic equation if you wanted to.


Why did the vector cross the road?
It wanted to be normal.

Offline

#3 2009-01-11 05:15:03

Asakura
Member
Registered: 2007-12-07
Posts: 10

Re: finding a function help

thank you for the reply but i reworded the question slightly, the original question was simply asking for f(5), f(20) and f(99), it doesn't ask for a general formula, i just thought it might have been easier to work out. looks like i was wrong...

Offline

#4 2009-01-11 05:21:48

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: finding a function help

The messy part only comes when you want to simplify. However, if you are not required to simplify, then you can just write down your Lagrange interpolation polynomial and leave it as it is.

Anyway, since the Lagrange polynomial in this case is at most cubic, you can also let

plug in the values of

and get the values
. This may take longer than the Lagrange interpolation method, but it won’t be so messy.

For polynomials of increasingly higher degree, the Lagrange method becomes more and more preferable, despite the messiness.

Offline

#5 2009-01-11 05:33:55

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: finding a function help

Asakura wrote:

thank you for the reply but i reworded the question slightly, the original question was simply asking for f(5), f(20) and f(99), it doesn't ask for a general formula, i just thought it might have been easier to work out. looks like i was wrong...

Sorry, you posted while I was typing my reply.

Anyway, since you are only looking for three more values of f, you don’t need to simplify your Lagrange polynomial after all. You can just apply mathsyperson’s method without worrying about any messiness. smile

Offline

#6 2009-01-11 05:34:54

Asakura
Member
Registered: 2007-12-07
Posts: 10

Re: finding a function help

after a few pages of scribbling(aka. used a calculator) i think i've got it:

f(5)=2349
f(20)=308489
f(99)=44357941

is this right?

Last edited by Asakura (2009-01-11 05:37:15)

Offline

#7 2009-01-11 06:09:00

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: finding a function help

Yep, I get the same answers as you.


Why did the vector cross the road?
It wanted to be normal.

Offline

Board footer

Powered by FluxBB