Answers:
a = 4
b = 4*pi/3 - sqrt(3)
======================================================
Step-by-step explanation:
To be differentiable, the function must be continuous. By extension the two pieces must join at x = pi/3. Think of two separate roads connecting to form one longer road. A continuous curve is something you can draw without lifting your pen or pencil.
Plug pi/3 into the first piece to find that tan(pi/3) = sqrt(3). Use a reference sheet or the unit circle to determine this output. Or you could use a calculator that produces square root outputs. WolframAlpha and GeoGebra are two useful tools.
Your calculator must be in radian mode. In calculus class, radians allow for simple derivatives (eg: y = sin(x) to dy/dx = cos(x) ). Derivatives are possible in degree mode, but the result is more complicated than compared to radian mode.
Plug x = pi/3 into the second piece to get (pi/3)a - b
If we want the two pieces to join up, then the result of tan(pi/3) and (pi/3)a-b must be equal, so,
piece1 = piece2
tan(pi/3) = (pi/3)a-b
sqrt(3) = (pi/3)a-b
sqrt(3)+b = (pi/3)a
b = (pi/3)a - sqrt(3)
We'll come back to this later.
------------------------
The function must not only be continuous at x = pi/3, but also differentiable here as well. The term "differentiable" basically means that we want a smooth curve without any sharp jagged edges.
Apply the derivative of each piece
y = tan(x) leads to dy/dx = sec^2(x)
y = ax-b leads to dy/dx = a
These derivative pieces must be equal to one another when x = pi/3, so that we have a smooth connection, rather than a sharp point (like you would find in something like an absolute value function). Treat the derivative results shown above as a new piecewise function. We want this new piecewise function to be continuous at x = pi/3
So,
piece1derivative = piece2derivative
sec^2(x) = a
sec^2(pi/3) = a
a = sec^2(pi/3)
a = [ sec(pi/3) ]^2
a = 2^2
a = 4
Again you must be in radian mode to compute sec(pi/3) = 2
We can then find the value of b
b = (pi/3)a - sqrt(3)
b = (pi/3)*4 - sqrt(3)
b = 4*pi/3 - sqrt(3)
I used GeoGebra to confirm the answers as shown below.