# Solving exponential equation to find a value in the exponent [closed]

How to find the value of c in the following equation: Exp[(-pi*a)/c]+Exp[(-pi*b)/c]=1

• Please provide more information. For instance, do you wish a numerical or symbolic solution? If the former, what are the values of the other symbols? What code have you tried? – bbgodfrey Jan 19 at 18:45
• Perhaps pi is π? – Rohit Namjoshi Jan 19 at 19:01
• First simplify: $-\pi a/c = y$ and $b/a = r$ to get: $$e^y + e^{ry} = 1.$$ – David G. Stork Jan 20 at 1:37
• values of a and b are known and i want a numerical value for c (maybe through iteration) – Shikha Sinha Jan 20 at 8:21
• @DavidG.Stork kindly elaborate, how to solve beyond this. – Shikha Sinha Jan 22 at 14:30

It does not look possible to solve this for general a, b. But for specific values of these, Mathematica can solve it for c Manipulate[
expr = Exp[(-Pi*a)/c] + Exp[(-Pi*b)/c] - 1;

Grid[{{Row[{"equation is ", expr, "==0"}]},
{Plot[expr, {c, -2, 2}]},
{N@Solve[expr == 0, c]}
}]
,
{{a, 1, "a"}, -2, 2, 1/10, Appearance -> "Labeled"},
{{b, 1, "b"}, -2, 2, 1/10, Appearance -> "Labeled"},
ContinuousAction -> False,
TrackedSymbols :> {a, b}
]


You can experiment more.

• value of a= 1.414 and value of b=3.928. i need a numerical value for c. Please help me accordingly – Shikha Sinha Jan 20 at 12:30
• @ShikhaSinha For these numerical values, Solve can't solve it. But FindRoot can be used. You could try expr = (Exp[(-Pi*a)/c] + Exp[(-Pi*b)/c] - 1) /. {a -> 1.414, b -> 3.928}; FindRoot[expr == 0, {c, 1}]; FindRoot[expr == 0, {c, -1}]; and so on. Make a plot of expr first to see the region where root is located. – Nasser Jan 20 at 16:40

Assuming you want positive solutions, you can do the following:

g[a_,b_] := Quiet @ Solve[Exp[(-Pi*a)/c] + Exp[(-Pi*b)/c] == 1 && c>0, c]


Examples:

g[1, 1]
g[1, Pi]
g[1.414, 3.928]


{{c -> π/Log}}

{{c -> Root[{ 1 + E^(-π/# + π^2/#) - E^(π^2/#)& , 8.4433225565523434202763737162354220192220.601814494499823}]}}

{{c -> 11.1144}}

As @David says, first simplify the equation to $$e^y + e^{r y}=1$$, which leaves only one parameter:

f[r_?Positive] := y /. FindRoot[E^y + E^(r y) == 1, {y, -1/r}]


where I've used $$y\approx -1/r$$ as a starting point for the numerical root search. There are no real-valued solutions for $$r\le0$$.

Plot it to get an idea of the solutions:

LogLinearPlot[{f[r], -ProductLog[1/r], -ProductLog[r]/r}, {r, 0, 100}]


An approximation for $$r\to0$$ is found by approximating $$e^{r y}\approx1+r y$$:

Solve[E^y + (1 + r y) == 1, y]
(*    {{y -> -ProductLog[1/r]}}    *)


An approximation for $$r\to\infty$$ is found by approximating $$e^y\approx1+y$$:

Solve[(1 + y) + E^(r y) == 1, y]
(*    {{y -> -ProductLog[r]/r}}    *)
` 