How to ensure continuity of a piecewise function? For a function with variable $t$ and constants $k,\delta$, how can I make it continuous?
$$  h=
    \begin{cases}
       t^2 & \quad\text{if}\quad |t|\le k \\
       ln\left(1+e^{\delta t}
 \right)^{\frac{2}{\delta}} - t&\quad\text{else} 
     \end{cases}
$$
Clearly this function is discontinuous at the point $k$, since $k^2 \neq ln\left(1+e^{\delta k} \right)^{\frac{2}{\delta}}-k$
What could I do to make it continuous? I am thinking when $|t|\le k$, I could make the function $h=\beta t^2$, and find a $\beta$ which makes these equal? Is this the right way?
By solving $\beta$ in this way I get $$\beta = \left(ln\left(1+e^{\delta t}
 \right)^{\frac{2}{\delta}} - t\right) $$
But if I do this, the shape of the graph seems very different from a quadratic, it is a lot steeper and changes the quadratic function a lot.
 A: This can only be a partial answer, because your question is a bit vague. "What could I do to make it continuous?" Well, plenty of things, eg drop the second part of the definition, so that $h$ is simply the quadratic defined in the first part! But i assume you want a simple modification such as a constant (non-zero) factor.
A potential snag is the first part of the definition for $h$ holds for $|t|\le k$. But the second part depends on $t$, not $|t|$. That might be ok if second part, when simplified, turned out to be a function of $t^2$.
The factor $k/n$ does not depend on $t$, so we have $$\ln\big((1+e^{\delta t})^{2/\delta}\big)-t$$ We have $\ln(a^b)=b\ln a$, so we get: $$(2/\delta)\ln(1+e^{\delta t})-t$$ The power series for $\ln(1+x)$ and $\exp(x)$ are well-known, but a little effort is needed to get the series for $\ln(1+e^t)$, and anyway you are not familiar with the theory. But in practice one just uses a math software program and we find it is: $$\ln2+\frac{t}{2}+\frac{t^2}{2^3}-\frac{t^4}{3\cdot2^6}+\frac{t^6}{2^63^25}-\dots$$
And, to my surprise, it turns out that the 2nd part of the definition is indeed a function of $h^2$! An actual proof of that takes more work, of course.
Anyway, I got that wrong earlier: you can make the $h$ continuous at $t=\pm k$. I was careless and rushed too much. I am sorry!
