484,355 views
45 votes
45 votes
Find a function where f(0)=2 and f(1)=2

User Agartzke
by
2.9k points

1 Answer

19 votes
19 votes

Answer:

Do you want to be extremely boring?

Since the value is 2 at both 0 and 1, why not make it so the value is 2 everywhere else?


f(x) = 2 is a valid solution.

Want something more fun? Why not a parabola?
f(x)= ax^2+bx+c.

At this point you have three parameters to play with, and from the fact that
f(0)=2 we can already fix one of them, in particular
c=2. At this point I would recommend picking an easy value for one of the two, let's say
a= 1 (or even
a=-1, it will just flip everything upside down) and find out b accordingly:
f(1)=2 \rightarrow 1^2+b+2=2 \rightarrow b=-1

Our function becomes


f(x) = x^2-x+2

Notice that it works even by switching sign in the first two terms:
f(x) = -x^2+x+2

Want something even more creative? Try playing with a cosine tweaking it's amplitude and frequency so that it's period goes to 1 and it's amplitude gets to 2:
f(x) = A cos (kx)

Since cosine is bound between -1 and 1, in order to reach the maximum at 2 we need
A= 2, and at that point the first condition is guaranteed; using the second to find k we get
2= 2 cos (k1) = cos k = 1 \rightarrow k = 2\pi


f(x) = 2cos(2\pi x)

Or how about a sine wave that oscillates around 2? with a similar reasoning you get


f(x)= 2+sin(2\pi x)

Sky is the limit.

User Medina
by
3.0k points