5

This is related to finding out the time it takes for the capacitor to discharge in a full-wave rectifier (link to ee.se), and it's of the form:

$$\mathrm{e}^{-x}=\sin(x) \tag{1}$$

To my knowledge it's impossible to determine $x$ analytically, because whether with $\ln()$ or $\arcsin()$, one term gets buried. Using the exponential equivalent formula for $\sin(x)$ doesn't seem to work, either. But I'm not fluent in math, so I'm asking it here: is it possible, maybe with some tricks, cheats, anything?


I shouldn't have presumed people to know what a full-wave rectifier with parallel RC load is or does, so for the sake of clarity this is what interests me:

The (ideal) theory is that the sine wave charges the capacitor. At the peak and for a short interval after it (on the downslope), the voltage across the capacitor is the same as the sine. When the two slopes are equal, the capacitor voltage is no longer a sine but an $\mathrm{e}^{-x}$, continuing from the last voltage value. The sine has an absolute value, so the second half of the period sees the value of the sine rising again, until it meets the discharging exponential -- this is what is needed here. The cycle continues:

cycle

For the sake of simplicity, here, on math.se, the question deals with a generic formula, (1), not the absolute value of it, and no complications with finding out the time and value when the capacitor voltage stops being a sine and continues as an exponential. There are also no time constants involved, or frequencies, therefore, the simplified version looks like this:

test

The capacitor discharges with the blue trace until it meets the red trace. Only the first point of intersection is needed (black dot), any other subsequent points are discarded (green circle). If this is solved, then $\mathrm{e}^{-ax}=\sin(bx)$ can also be solved, and even the moment when the waveform switches shapes, though I suspect that will be a tad more complicated (and not part of this question).

  • 2
    I would doubt that there is a closed form; however, it might be helpful to note that since $e^{-x}\to0$ fairly quickly as $x\to\infty$, the roots of that equation will eventually be very close to multiples of $\pi$. – csch2 Jul 20 '21 at 16:24
  • I see no analytic solution. But if it helps, the numerical solution is: $x = 0.588533$. – David G. Stork Jul 20 '21 at 16:25
  • @csch2 The approximation that is usually considered is that the time constant is (much) larger than the period, so it can be approximated by $T/2\cdot1/\tau$, as linear. – a concerned citizen Jul 20 '21 at 16:25
  • @DavidG.Stork Yes, I was afraid of that, otherwise find_root() works fine in wxMaxima. – a concerned citizen Jul 20 '21 at 16:26
  • 1
    @DavidG.Stork Did you mean a numerical solution? There's an infinity of them. – jjagmath Jul 20 '21 at 16:41
  • 1
    Yes.... a solution... the lowest-$x$ solution, which is the one relevant to the capacitor discharge problem. – David G. Stork Jul 20 '21 at 16:44
  • @jjagmath This problem only applies to the interval $[0,\pi]$, since it's repeating. It's not a mathematical problem, it's a mathematical view of the real world problem. – a concerned citizen Jul 20 '21 at 18:54
  • @aconcernedcitizen There's no indication of that in the body of the question. I never follow the links since it's part of the job of the OP to post the complete information about the question. – jjagmath Jul 20 '21 at 18:58
  • 1
    @jjagmath I understand what you mean, but, by that same logic, should the links you provide in your answer also not be followed? I agree that I didn't provide details even if the problem is stated (I shouldn't have assumed electrical knowledge from anyone), but, at the same time, the link I provided is not in the back end of the web; it's right here, on stackexchange. – a concerned citizen Jul 20 '21 at 19:11
  • There's an important difference between the links in my answer and the link in your question. My answer would be complete without the links. I add them as a convenience. – jjagmath Jul 20 '21 at 23:07
  • This may be helpful: https://math.stackexchange.com/q/3602833 – Gary Jul 21 '21 at 06:59

4 Answers4

7

You can find a REALLY COMPLICATED analytic expression for the solution by means of the Lagrange inversion theorem. After some simplifications the answer is $$x = \frac{1}{2}+\sum_{n=2}^\infty\frac{1}{n!\,2^n}\sum_{k=1}^{n-1}(-1)^k n^{\overline k}B_{n-1,k}(a_1,a_2,\ldots,a_{n-k})$$

where $n^{\overline k}$is the rising factorial, $B_{i,j}$ are the Bell polynomials and $a_j$ is given by $$a_j = \begin{cases} -\frac{1}{2 (j+1)} & j \equiv 1 \pmod 2 \\ 0 & j \equiv 2 \pmod 4 \\ \frac{1}{j+1} & j \equiv 0 \pmod 4 \end{cases}$$

jjagmath
  • 18,214
  • "Be careful what you ask for" comes to mind. I find it difficult to test this in wxMaxima, but if this is, indeed, the solution, then even a simple binary root-finding algorithm will take a lot less cycles to compute. Thank you for the answer, though, I'll leave the question opened until tomorrow. – a concerned citizen Jul 20 '21 at 19:07
  • 2
    I tested it in Mathematica, $20$ terms of the series gives $7$ decimals of the answer. You're right, any root finding algorithm probably will be more efficient that using this series. – jjagmath Jul 20 '21 at 19:48
  • 1
    @TymaGaidash I considered $f(x) = e^{-x}-\sin(x)-1$ (I added the $-1$ so it satisfies $f(0)=0$) and evaluated the series of the inverse function at $-1$. – jjagmath Jul 20 '21 at 23:05
  • 1
    It's not very practical, but it is the mathematical solution, so I selected this as the answer. – a concerned citizen Jul 21 '21 at 16:29
3

Do not expect a closed form solution for the transcendental equation (remember that this is already the case for $x=\cos(x)$).

Consider that you look for the zero's of function $$f(x)=e^{-x}-\sin(x)$$

Beside its first zero, all solutions will be closer and closer to $n\pi$. So, let $x_n=n \pi - \epsilon_n$; expanding as a series around $\epsilon_n=0$, we have $$e^{-n\pi }+\left((-1)^n+e^{-n\pi }\right) \epsilon +\frac{1}{2} e^{-n\pi } \epsilon ^2+\frac 16\left(e^{-n\pi }-(-1)^n\right) \epsilon ^3+\frac{1}{24} e^{-n\pi } \epsilon ^4+O\left(\epsilon ^5\right)$$ Now, using series reversion $$\epsilon_n=t-\frac 12 \frac{t^2}{1+e^{(1+i)n \pi }}+\frac 16\frac{2+e^{(1+ i)2n \pi }}{\left(1+e^{(1+i) \pi n}\right)^2}t^3-\frac 1{24}\frac{2 e^{(1+i)n \pi }+11 e^{(1+ i) 2n\pi }+6}{\left(1+e^{(1+i) \pi n}\right)^3}t^4+O(t^5)$$ where $$t=-\frac{1}{1+e^{(1+i) \pi n}}$$ which are almost exact as shown below

$$\left( \begin{array}{ccc} n & \text{approximation} & \text{solution} \\ 1 & +4.52287034975377 \times 10^{-2} & +4.52287211791471 \times 10^{-2} \\ 2 & -1.86396620299838 \times 10^{-3} & -1.86396620299838 \times 10^{-3} \\ 3 & +8.07060308584963 \times 10^{-5} & +8.07060308584963 \times 10^{-5} \\ 4 & -3.48733019472297 \times 10^{-6} & -3.48733019472297 \times 10^{-6} \\ 5 & +1.50701750250023 \times 10^{-7} & +1.50701750250023 \times 10^{-7} \end{array} \right)$$

IV_
  • 6,964
  • I was afraid of this from the beginning. Even jjagmath's answer is not a true solution since it involves infinite series. Maybe mathematically it makes sense, but it's meant to solve the darn capacitor discharge problem. It is a nice closed-form solution, though. – a concerned citizen Jul 21 '21 at 16:28
0

Basic Recursive Method:

As always there is also recursive solution which is simpler, but still has an infinite number of terms like the other answer’s series. Please see this graph.Here are two ways to find the answer as $x=$ some recursive function with solution as (solution, solution) because of the nature of the identity function $y=x$:You can easily use the angle plus $2\pi n$ method to find the other angles as well.

$$e^{-x}=\sin(x)\implies A_0(x)=x=\sin^{-1}\left(e^{-x}\right)=A_1(x)\implies x=\lim_{n\to \infty}A_n(x)=A_{\infty}(x)=\sin^{-1}\left(e^{-{\sin^{-1}\left(e^{-…}\right)}}\right), A_{n+1}(x)= \sin^{-1}\left(e^{-A_n(x)}\right)$$

enter image description here

You can substitute a value for x and get a result as well for $A_n(x)$ because the approximations converge a horizontal solution line. Please also correct me and give me feedback.

Fourier Series:

$\def\Im{\operatorname{Im}}\def\B{\operatorname B}$ Here is a single infinite sum for the smallest solution to

$$e^{-x}=\sin(x)\iff x+\ln(\sin(x))=0$$

$x\approx\frac\pi8$, so center the function around it and we now solve:

$$f(x)=x+\ln\left(\sin\left(x+\frac\pi8\right)\right)-\ln\left(\sin\left(\frac\pi8\right)\right)=-\frac\pi8-\ln\left(\sin\left(x+\frac\pi8\right)\right)\implies x=\frac\pi8+h\left(-\frac\pi8-\ln\left(\sin\left(\frac\pi8\right)\right)\right)$$

where $h(x)$ is the inverse of $f(x)$. Expand $h(x)$ as a Fourier sine series with interval $L=f\left(\frac\pi 8\right)=\frac\pi8+\frac12\ln(\sqrt2+2)\approx 1.00667$

$$h(x)-\frac\pi8=\sum_{n=1}^\infty a_n \sin\left(\frac{\pi n x}L \right),a_n=\frac2L\int_0^L\left(h(t)-\frac\pi8\right)\sin\left(\frac{\pi n t}L\right)dt$$

$t\to h(t)+\frac\pi8$ gives:

$$\Im\int_\frac\pi8^\frac\pi4\left(t-\frac\pi4\right)\frac2L\exp\left(\frac{\pi i n}L\left(t-\frac\pi8+\ln(\sin(t))-\ln\left(\sin\left(\frac\pi8\right)\right)\right)\right)(\cot(t)+1)dt$$

Tabular integration uses the incomplete beta $\B_z(a,b)$ function:

$$a_n=\frac1{\pi n}\Im\left(e^{-\left(\frac12+\frac i8\right)\frac{\pi^2n} L}\left(\left(2-\sqrt2\right)^{-\frac{\pi i n}{2L}}\B_i\left(\frac{(1-i)\pi n}{2L},\frac{\pi i n}L+1\right)-\left(1-\sqrt[4]{-1}\right)^{-\frac{\pi i n}L}\B_\sqrt[4]{-1} \left(\frac{(1-i)\pi n}{2L},\frac{\pi i n}L+1\right)\right)\right)-\frac1{4n}$$

These coefficients match the integral representation for the series. It inverts $f(x)=x+\ln\left(\sin\left(x+\frac\pi8\right)\right)-\ln\left(\sin\left(\frac\pi8\right)\right)$:

The series correctly gives $h(f(x))-\frac\pi8=x-\frac\pi8$:

so the series definitely converges to the inverse function despite being pretty slow. Therefore:

$$e^{-x}=\sin(x)\implies x=\frac\pi8+\frac\pi8\frac{4\ln(2\sqrt2+4)-\pi}{4\ln(2+\sqrt2)+\pi}+\sum_{n=1}^\infty\frac1{\pi n}\sin\left(\frac{\pi(4\ln(2\sqrt2+4)-\pi)n}{4\ln(\sqrt2+2)+\pi}\right)\Im\left(e^{-\frac{(4+i)\pi^2n}{4\ln(\sqrt2+2)+\pi}}\left(\left(2-\sqrt2\right)^{-\frac{4\pi i n}{4\ln(\sqrt2+2)+\pi}}\B_i\left(\frac{4\pi (1-i)n}{4\ln(\sqrt2+2)+\pi},\frac{8\pi i n}{4\ln(\sqrt2+2)+\pi}+1\right)-\left(1-\sqrt[4]{-1}\right)^{-\frac{8\pi i n}{4\ln(\sqrt2+2)+\pi}}\B_\sqrt[4]{-1} \left(\frac{4\pi (1-i)n}{4\ln(\sqrt2+2)+\pi},\frac{8\pi i n}{4\ln(\sqrt2+2)+\pi}+1\right)\right)\right)$$

is true assuming no typos. No Bell polynomials were needed.

Тyma Gaidash
  • 12,081
  • This is a nice approximation, though if it's a matter of approximations then a root-finding algorithm might work faster than all those nested functions. – a concerned citizen Jul 20 '21 at 21:11
  • Note that $\arcsin(e^{-x})$ is the inverse of $-\log(\sin(x))$ so they cannot both work. If the iteration of one of the function gets closer to the solution, the iteration of the other obviously gets farther. With a few calculations, iterating $\arcsin(e^{-x})$ beginning with numbers close to the answer, we see that it converges to the solution (and iterating $-\log(\sin(x))$ diverges, as expected) – jjagmath Jul 21 '21 at 01:32
-1

As it involves a transcendental relation a numerical solution by Runge Kutta RK4 can be used, there can be no analytical solution.

WA interxn of sine, exp curves

Among several roots the first root is

$$ x\approx 0.588533$$

An asymptotic expansion solution when $\sin x \to 0$ is

$$ x= 2 k \pi,$$

the roots go progressively near to this asymptotic value.

Narasimham
  • 40,495