Solve the piece wise function when f(17)

f(x) = f(x-3)+2 if x > 10
-5 if x <= 10

Would the answer be 1? Thanks

I believed the answer is 16 but computer teacher is telling me it 1. Thanks

when x = 17

f(17) = f(14) + 2

but
f(14) = f(11) + 2

but
f(11) =f (8) + 2
but f(8) = -5 , since x ≤ 10
so f(11) = -5+2 = -3
f(14) = -3+2 = -1
f(17) = -1+2 = +1

(strange question)

Let say the other function is

x-2 , if x < 0
x^2 + 1 , if x >= 0

f(-4) would be -6? I kind of not understand why do we keep going down the value. Thanks

In this last example your function is well defined as

f(x) = x-2 or x<0 and f(x) = x^2 + 1 for x≥0
so f(-4) simply falls in the first part
f(x) = x-2
f(-4) = -4 - 2 = -6 , so you are right.

Your first problem did not have f(x) defined explicitly.
It was defined in terms of f(x-3)
so we had to find values step-by-step

Oh, thanks you so much! I did not realize f(x-3) and (x-3) make such different.

To solve the piecewise function when f(17), we need to determine which condition applies to the given value of x.

In this case, since x = 17, which is greater than 10, we will use the first condition: f(x) = f(x-3) + 2.

Substituting x = 17 into this equation, we get:
f(17) = f(17-3) + 2
= f(14) + 2

Now we need to determine the value of f(14) using the same conditions.

Since x = 14, which is also greater than 10, we will use the first condition again:
f(14) = f(14-3) + 2
= f(11) + 2

We can see that the value of x is now 11, which is still greater than 10. So, we apply the first condition once again:
f(11) = f(11-3)+2
= f(8) + 2

Continuing this process, we reach a point where the value of x becomes less than or equal to 10. At this point, we need to use the second condition: f(x) = -5.

In our case, f(8) = f(8-3)+2 = f(5)+2
= f(5-3)+2+2
= f(2)+4

Since x = 2, which is less than or equal to 10, we use the second condition:
f(2) = -5

Now, substituting this value back into the previous equation, we get:
f(8) = -5 + 4
= -1

Substituting this value back into the earlier equation, we have:
f(11) = -1 + 2
= 1

Again, substituting this value back into the equation, we find:
f(14) = 1 + 2
= 3

Finally, we can substitute this value back into the very first equation to get:
f(17) = 3 + 2
= 5

So, the correct value for f(17) is 5, not 1.