Math Is Fun Forum

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

You are not logged in.

#1 2008-06-23 21:34:16

Tredici
Member
Registered: 2005-12-12
Posts: 28

What I Would Consider Quite Complex Interpolation

Hi guys,

I'm writing an algorithm for a property matching website, and I've ran into a little problem. Please excuse any incorrect notation or nomenclature, as I'm fairly unpractised.

I need a function which produces a y value of 0 when x is 350, 100 when x is 500, and 0 when x is 550. So:


After a bit of quite simple polynomial interpolation I have:

However, I've just realised, I need

to be the maximum point of the curve. Is it possible to find a function which satisfies this?

Thanks in advance for any assistance.

Offline

#2 2008-06-23 22:01:57

cushydom
Member
Registered: 2008-04-23
Posts: 10

Re: What I Would Consider Quite Complex Interpolation

f(x)=((350-x)(x-650)(x-550)^2)/562500

Offline

#3 2008-06-23 22:03:10

cushydom
Member
Registered: 2008-04-23
Posts: 10

Re: What I Would Consider Quite Complex Interpolation

that face is meant to be an = then a (. it replaced them

Offline

#4 2008-06-23 22:52:14

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

Re: What I Would Consider Quite Complex Interpolation

Fixed that for you.
There's a "never show smilies as icons for this post" checkbox that you can use to prevent the changes.

Or if you want smilies elsewhere, then you could put something like "... = (..." instead of "...=(...".


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

Offline

#5 2008-06-24 00:26:17

Tredici
Member
Registered: 2005-12-12
Posts: 28

Re: What I Would Consider Quite Complex Interpolation

Thank you so much Cushydom.

This works incredibly well. Can I ask how you worked it out?

Offline

#6 2008-06-24 03:15:52

cushydom
Member
Registered: 2008-04-23
Posts: 10

Re: What I Would Consider Quite Complex Interpolation

i wanted an equation with zeroes at 350 and 550. this could be (x-350)(x-550). i needed a maximum at 500 so i added the (x-650) to give this by symmetry. i then included another (x-550) in order to keep the shape right. then i multplyed by a constant to get it to go through the points

Offline

#7 2008-06-24 06:38:17

Tredici
Member
Registered: 2005-12-12
Posts: 28

Re: What I Would Consider Quite Complex Interpolation

Cushydom, thanks for everything. You've been really helpful.

How would you go about abstracting this so that it's not dependent on y values?

, where
is the maximum,
,
, and
are positive and
?

Offline

Board footer

Powered by FluxBB