Solving a set of simultaneous equation for periodic boundary conditions.

Given $$g(x) = e^{-|x-x_0|/\alpha} + Ae^{-x/\alpha} + Be^{x/\alpha}$$ $$\alpha >0$$, $$x_0 \in (0,1)$$

Constraints are $$g(0) = g(1)$$ and $$g'(0) = g'(1)$$

Solve for $$A$$ and $$B$$.

My solution : $$A = \frac{e^{(x_0-1)/\alpha}}{1-e^{(-1/\alpha)}}$$ and $$B = \frac{e^{-x_0/\alpha}}{e^{1/\alpha}-1}$$

But when i verify, $$g(0) \ne g(1)$$. Certainly I am wrong and appreciate your help.

Edit : My differentiation $$g'(x) = -\frac{sign(x-x_0)}{\alpha}e^{-|x-x_0|/\alpha} -\frac{A}{\alpha}e^{-x/\alpha} + \frac{B}{\alpha}e^{x/\alpha}$$

• How do you differentiate $$g(x)$$ a function with absolute values? – Dr. Sonnhard Graubner Nov 21 '19 at 13:02
• @Dr.SonnhardGraubner : $$g'(x) = -\frac{sign(x-x_0)}{\alpha}e^{-|x-x_0|/\alpha} -\frac{A}{\alpha}e^{-x/\alpha} + \frac{B}{\alpha}e^{x/\alpha}$$ – Rajesh Dachiraju Nov 21 '19 at 13:09