c = 1 (slider from -5 to 5, step 0.1)
d = 2 (slider from -5 to 5, step 0.1)
f(x) = c * x + d
g(x) = abs(f(x))
h = If(x < (-d) / c, -f(x), f)
a = -3.1415926271795858 (slider from -6.28318531 to 6.283185307179586, step 0.26179939)
b = 3.141592653589793 (slider from -6.283185307179586 to 6.283185307179586, step 0.2617993877991494)
p = Function(sin(x), a, b)
q(x) = (cos(x) + 1) * (x < a)