# Two piece wise functions

**Algebra**Level 4

If a step function,
\(S(x)= \begin{cases}
0 &\text{for} & x \leq 0
\\ 1 &\text{for} & x > 0 \end{cases} \)

Then a piece wise function \(f(x)=\begin{cases}
x^2 & \text{for} & 1<x \leq 2
\\ 4x & \text{for} & x > 2 \end{cases}\) can be written in terms of S as \(f(x)=x^2+(ax-x^2)S(x+b)\)

Then, find the value of a+b