Hello! Really can't wrap my head around this so please help!

Consider the function:
f(x) = x^2+(1000-x)^2

First find out where it is increasing, and then use this fact to determine which number is larger:
a) 1000^2
or
b) 998^2 + 2^2

I found that the function increases at x=500 but how do I use that fact to figure this out???

2 answers

f(x) = x^2+(1000-x)^2
= 2x^2 - 2000x + 1000000

f' = 4x - 2000
f'=0 at x=500
f' < 0 for x < 500, so f is decreasing
f' > 0 for x > 500, so f is increasing

so, f(1000) > f(998) because f is increasing at that point
f(x) = x^2+(1000-x)^2
... = x² + 1E6 - 2000x + x²
... = 2x² - 2000x + 1E6

the minimum is on the axis of symmetry at x=500 ... the function increases from there

so as x increases (below x=500), the function decreases

f(0) = 0² + (1000 - 0)² = 1000²

f(2) = 2² + (1000 - 2)² = 998² + 2²