If I know the function is continuous, is it okay to calculate the value of an unknown constant like this?

38 Views Asked by At

I have the function

$f(x) = \begin{cases} x+3, & x\in[-2,1]\\\\ (x-2)^2 + k, & x\in(1,3] \end{cases}$

where $k \in \mathbb{R}$.

If I know the function is continuous, would it be wrong to calculate the value like this:

$ x+3 = (x-2)^2 + k $

when x = 1 as the function is continuous

$ 1+3 = 1 - 4 + 4 + k$

$ 4 = 1 + k$

$3 = k$

I know this may not work if the function is not continuous, but if it is continuous it should work every time. Right?

1

There are 1 best solutions below

2
On

Yes, it will always work. But you can get to the same conclusion with less computations if you note that $(1-2)^2=(-1)^2=1$. There is no need to use the fact that $(1-2)^2=1^2-2\times2+2^2$.