How to combine 2 functions to find equation of a line?

90 Views Asked by At

I want to find the equation of a line that has equation $y\ =\ \frac{1}{\sqrt{\cos\left(x\right)}}+1$ at x > 0, and has equation $y\ =\ -\frac{1}{\sqrt{\cos\left(x\right)}}+3$ at x<0. The line looks to be of the form $y = x^3 + 2$, but is there any way to find this other than trial and error of parameters?