Consider the function f(x) = \begin{cases} ax^2 & \text{if } x \geq a,\\ ax +2a& \text{if } x <a, \end{cases} where $a$ is some number.
What is the largest value of $a$ such that the graph of $y=f(x)$ intersects every horizontal line at least once?
So we want f(x) to intersect every horizontal line, which means it must not be a horizontal line itself I am pretty sure f(x) should be a curve (?) I'm thinking a parabola. I don't get how to make a parabola from this piece-wise defined function. Solutions? Thanks for all your help!
Edit: I just realized that this curve must go infinitely in every direction... Is the graph even a curve?
Notice that it intersects every horizontal line $\iff$ it is a surjective function. One way to ensure that is if the parabolic piece of the function begins under where the line left off:
$$a^3 \leq a^2 + 2a \implies a(a^2 - a - 2) \leq 0 \implies a(a-2)(a+1) \leq 0$$
Now, notice this is a cubic with positive leading coefficient, so we get: $a \leq -1$, or $0 \leq a \leq 2$, yielding the maximum value of $a = 2$.
What would happen if $a > 2$? Then $$\lim_{x \to a} (ax + 2a) = a^2 + 2a < a^3$$ and thus every $y$ value in the open interval $]a^2 + 2a, a^3[$ does not get hit by the function.
Does that help?