Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I need to model the solar radiation incident on a solar panel. I tried using $$\tanh(b*(x-a))-\tanh(b*x)$$ but it does not give me a lot of flexibility with the characteristics of the curve, namely width of the plateau and its steepness.

share|improve this question

3 Answers 3


The width of the plateau is $2a$, and the steepness increases with $b$. Note that one exponential controls each side, so you can modify each one independently if you like. Note that this is never exactly $0$ outside the plateau or exactly $1$ inside it.

share|improve this answer

When you want a graph that looks like a smoothed version of the characteristic function of the interval $[0,a]$ then your "Ansatz" is just perfect. Increasing $b\gg1$ controls the steepness of the vertical sides. But if you want to model the radiation intensity during a day, or a year, you have to talk about the inclination angle of the rays, etc.

share|improve this answer

I would suggest taking a normal distribution and inserting a constant value for the length of your plateau. This is the normal distribution, multiplied by a constant factor: $$f(\sigma, \mu ,h, x) = h\cdot \frac{1}{\sigma\sqrt{2\pi}} e^{ -\frac{(x-4)^2}{2\sigma^2} }$$ Now lets define $$ p(\sigma,\mu,h,x) = \begin{cases} f(\sigma,\mu,h,x) \quad \text{if }x<-\mu \\ \frac{h}{\sigma \sqrt{2\pi}} \quad \text{if }-\mu\leq x \leq \mu \\ f(\sigma,\mu,h,x) \quad \text{if }x<-\mu \\ \end{cases} $$

This function is continous on $\mathbb{R}$ and can easily be scaled. For different width you can modify $\mu$, and the height can be modified by $h$ and $\sigma$. The steepness can be varied by $\sigma$.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.