# Homework Help: Need to create a function in Precalc

1. Jun 12, 2012

### suej173

Need to create a function in Precalc....

1. The problem statement, all variables and given/known data
Let a be the # corresponding to the first letter of your name in the alphabet. Let b be the # corresponding to the first letter of your last name. Come up with a function f such that f(a)=b and f(b)=a (you need to write the answer as y=f(x)).

2. Relevant equations
My #'s would be f(19)=10 and f(10)=19

3. The attempt at a solution
I would just like some help starting off....I feel a bit lost. Thanks for your time!

2. Jun 12, 2012

### skiller

Re: Need to create a function in Precalc....

Hi suej173!

There is obviously the trivial function, but assuming you want more than that, then:

If a and b are given, then as you only have 2 points to work with, the simplest solution would be the function describing a straight line through these 2 points. Does this help?

If you want y to be a function of a and b also (which I'm guessing is what you're after), then f(x,a,b) is a bit more complicated. Hmmm, I'll think about that one.

Last edited: Jun 12, 2012
3. Jun 14, 2012

### HunterDX77M

Re: Need to create a function in Precalc....

I agree with oay, a linear equation would be the quickest and simplest way to do this. The two necessary parts to your function are that f(19) = 10 and f(10) = 19. If your equation is in the form f(x) = y, then you can think of f(19) = 10 as (19, 10) on a coordinate plane, where 19 is the x-coordinate and 10 is the y-coordinate. What about the other requirement, f(10) = 19? What would be its corresponding point on the coordinate plane?

If you've got two points whose x and y coordinates you know, can you make a function out of that? Hope that helps.

4. Jun 14, 2012

### SammyS

Staff Emeritus
Re: Need to create a function in Precalc....

If you need y = f(x) and x = f(y), then you would have x = f(f(x)) so that f is a function which is it's own inverse .

5. Jun 14, 2012

### skiller

Re: Need to create a function in Precalc....

D'oh! I can't believe I wrote this! I can only put it down to the fact that it was very late at the time (UK time). Sorry!