3

I have the following equation:

$$ \sum_{i=1}^N \ln (d_i) d_i^{-x} = C \sum_{i=1}^N d_i^{-x} $$ where $C$ and $d_i$ are constants (known variables).

For $N=2$ the equation takes the form $$ \ln (d_1) d_1^{-x} + \ln (d_2) d_2^{-x} = C (d_1^{-x} + d_2^{-x}) $$ and it is possible to solve it analytically for $x$.

My question is whether it is possible to solve the first equation analytically for $N>2$. In general, this type of equation can be written as:

$$ \sum_{i=1}^N g(x_i) f(x_i) = C \sum_{i=1}^N f(x_i) $$

Edit: from @ancient mathematician we can rewrite $d_i$ to $e^{\lambda_i}$. Thus, the equation now is defined as

$$ \sum_{i=1}^N \lambda_i e^{-\lambda_i x} = C \sum_{i=1}^N e^{-\lambda_i x} $$ We can notice that the left part is the derivative of the right part, such as

$$ -\frac{d}{dx} \sum_{i=1}^N e^{-\lambda_i x} = C \sum_{i=1}^N e^{-\lambda_i x} $$ with $f(x) = \sum_{i=1}^N e^{-\lambda_i x}$ we have

$$ f'(x) + Cf(x) = 0 $$

The task is to find the $x$ from this equation.

Frederik vom Ende
  • 5,187
  • 1
  • 11
  • 39
RobJan
  • 31

3 Answers3

1

Firstly, there are not convenient approaches to use the derivative in the described task.

In according with OP, the given equation can be presented in the form $\;g(\Lambda,x)=0,\;$ where $$h(\Lambda, x) =\sum\limits_{i=1}^N (C-\lambda_i)e^{-\lambda_ix} ,\quad \Lambda=\{\lambda_1, \lambda_2\dots\lambda_N\}=\{\ln d_1, \ln d_2\dots\ln d_N\}.\tag1$$

Let $\;\lambda_1\le\lambda_2\le\dots\le\lambda_N,\;$ then from the given equation should $$C\in(\lambda_1,\lambda_N).$$

If $\,N=2,\,$ then $$(C-\lambda_1)e^{(\lambda_2-\lambda_1)x}=\lambda_2-C,\quad x=\dfrac1{\lambda_2-\lambda_1}\ln\dfrac{\lambda_1-C}{C-\lambda_2}.\tag2$$

If $\;\forall (i)\rightarrow \dfrac{\lambda_i}C \in\mathbb Q\;$ and $\;\dfrac{\lambda_i}C=\dfrac{p_{\,i}}q,\;p_{\,i},q\in\mathbb N,\;$ then $$h(\Lambda,x) = C\sum\limits_{i=1}^N \dfrac{q-p_{\,i}}{q}\,\left(\large e^{^{-\frac {Cx}q}}\right)^{p_{\,i}}= P(y),\quad\text{where}\quad y=\large e^{^{-\frac {-Cx}q}}\tag3$$ and $\,P(y)\,$ is polynomial.

In the common case, approach $(3)$ can be used approximately.

Another way in the common case is a transformation of the inner exponents in $(1)$.

Let us present the inner exponents in the form of $$e^{-\lambda_i x}\approx p_i e^{-\lambda_1 x}+q_i e^{-\lambda_N x},\qquad (i=2,3,\dots N-1),$$ where $$p_i = \dfrac{\lambda_i - \lambda_N}{\lambda_1-\lambda_N} e^{(\lambda_1-\lambda_i)x^{prev}},\quad q_i = \dfrac{\lambda_1 - \lambda_i}{\lambda_1-\lambda_N} e^{(\lambda_N - \lambda_1)x^{prev}},$$ (see also WA plot), then we can get $(1)$ in the form of $$h(\Lambda,x)\approx Ae^{-\lambda_1 x}+Be^{-\lambda_N x}=0,$$ where $$A=C-\lambda_1+\sum_{i=2}^{N-1} p_i(C-\lambda_i),\quad B=C-\lambda_N + \sum_{i=2}^{N-1} q_i(C-\lambda_i).$$ Then $$e^{(\lambda_N-\lambda_1) x}=-\dfrac BA,$$ $$x=\dfrac1{\lambda_N-\lambda_1}\ln\left(-\dfrac BA\right).\tag4$$ Iterative applying of $(4)$ leads to the solution with arbitrary accuracy.

0

Set $d_n^{-1}=e^{a_n}$ $$\sum_{n=1}^N(a_n+c)e^{a_nx}=(a_1+c)e^{a_1x}+(a_2+c)e^{a_2x}+\dots+(a_N+c)e^{a_Nx}=0\iff -1=\frac{a_1+c}{a_N+c}e^{(a_1-a_N)x}+\dots+ \frac{a_{N-1}+c}{a_N+c}e^{(a_{N-1}-a_N)x}$$ and $x=\frac{\ln(t)}{a_{N-1}-a_N}$: $$-1=\frac{a_1+c}{a_N+c}t^\frac{a_1-a_N}{a_{N-1}-a_N}+\dots+\frac{a_{N-2}+c}{a_N+c}t^\frac{a_{N-2}-a_N}{a_{N-1}-a_N}+\frac{a_{N-1}+c}{a_N+c}t$$

Also, $\frac{a_j+c}{a_N+c}=b_j, \frac{a_j-a_N}{a_{N-1}-a_N}=r_j,\frac{a_{N-1}+c}{a_N+c}=a:$ $\sum\limits_{n=1}^{N-2} b_nt^{r_n}+at+1=0\tag1$ can be approximated by assuming arbitrary $b_j,r_j$, so it is valid to solve the following with Lagrange reversion: $$-\frac1a-\frac1a\sum_{j=1}^{N-2}b_jt^{j_n}=t\implies t=-\frac1a+\sum_{n=1}^\infty\frac1{(-a)^nn!}\left.\frac{d^{n-1}}{dt^{n-1}}\left(\sum_{j=1}^{N-2}b_jt^{r_j}\right)^n\right|_{-\frac1a}\tag2$$ using a multinomial like theorem and factorial power $u^{(v)}$:

$$\left(\sum_{j=1}^{N-2}b_jt^{r_j}\right)^n= \sum_{n_1=0}^{n_0}\dots\sum_{n_{N-3}=0}^{n_{N-4}}\frac{n_0!(b_{N-2}t^{r_{N-2}})^{n_{N-3}}}{n_{N-3}!}\prod_{j=1}^{N-3}\frac{(b_jt^{r_j})^{n_{j-1}-n_j}}{(n_{j-1}-n_j)!} $$

$$\begin{align}t=-\frac1a+\sum_{n_0=1}^\infty\frac1{(-a)^{n_0}}\sum_{n_1=0}^{n_0}\dots\sum_{n_{N-3}=0}^{n_{N-4}}\frac{b_{N-2}^{n_{N-3}}}{n_{N-3}!}\left.\frac{d^{n_0-1}}{dt^{n_0-1}}t^{\sum\limits_{j=1}^{N-3}r_j(n_{j-1}-n_j)+r_{N-2}n_{N-3}}\right|_{-\frac1a}\prod_{j=1}^{N-3}\frac{b_j^{n_{j-1}-n_j} }{(n_{j-1}-n_j)!}=-\frac1a+\sum_{n_0=1}^\infty\sum_{n_1=0}^{n_0}\dots\sum_{n_{N-3}=0}^{n_{N-4}}\frac{b_{N-2}^{n_{N-3}}}{n_{N-3}!}\left(\sum_{j=1}^{N-3}r_j(n_{j-1}-n_j)+r_{N-2}n_{N-3}\right)^{(n_0-1)}\left(-\frac1a\right)^{\sum\limits_{j=1}^{N-3}r_j(n_{j-1}-n_j)+r_{N-2}n_{N-3}+1}\prod_{j=1}^{N-3}\frac{b_j^{n_{j-1}-n_j} }{(n_{j-1}-n_j)!}\end{align}\tag3$$

When when $N=5$: $$-1=at+\sum_{j=1}^3 b_j t^{r_j}\implies t=-\frac1a+\sum_{n_0=1}^\infty\sum_{n_1=0}^{n_0}\sum_{n_2=0}^{n_1}\frac{b_3^{n_2}}{n_2!}\left(r_1(n_0-n_1)+ r_2(n_1-n_2) +r_3n_2\right)^{(n_0-1)}\left(-\frac1a\right)^{r_1(n_0-n_1)+ r_2(n_1-n_2) +r_3n_2+1}\frac{b_1^{n_0-n_1} }{(n_0-n_1)!} \frac{b_2^{n_1-n_2} }{(n_1-n_2)!} $$

plugging in gives a real root for arbitrary $b_{1,2,3},r_{1,2,3}$ verifying $(3)$. Now the original equation has an explicit solution.

Тyma Gaidash
  • 13,576
0

As already pointed out, an explicit solution is not easy to find. However an approximate "stable" solution can be found by convex optimization. In fact denoting as before $f(x)= \sum_{i=1}^N e^{-\lambda_i x}$, the goal is to find $x$ such that $f'(x)+Cf(x)=0$, which is the same as saying $$ \frac {d}{dx} ( e^{Cx} f(x) ) =0.$$ So, we want to find a critical point for $g(x)=e^{Cx}f(x)$; notice that $g(x)= \sum_{i=1}^N e^{(C-\lambda_i) x}$ is a strictly convex function as long as $\lambda_i \neq C$ for some $i$.

In particular we want to find the unique minimizer for a convex function, so we may use any convex optimization method (also, $C$ and $\lambda_i$ are known so also the second derivative is bounded and known), for example gradient descent, which is an iterative algorithm of the form $x_{n+1}=x_n- \gamma g'(x_n)$, and $\gamma$ is the learning rate, chosen accordingly to properties of $g$, for example $\gamma= \frac 2{\mu+L}$ where $ 0<\mu < g''<L$ in the region where we know the minimum is.

About the region where the minimum is, notice that $g(0)=N$, so ${\rm min} \{ g(x) \}\leq N$; in particular $e^{(C-\lambda_i)x} <N$ at the minimum point. This gives good restrictions on $x$ when $\lambda_i$ are large in absolute value (which is the case when $d_i$ is close to $0$).

Notice that the convexity of $g$ implies that $g'$ is increasing, so also any dyadic method of finding a root of $g'$ should work pretty fast; moreover we can immediately see if $x>0$ or $x<0$, which helps us find good estimates for $\mu$ and $L$.

StheW
  • 313