2
$\begingroup$

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

$\endgroup$
  • 2
    $\begingroup$ 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? $\endgroup$ – bbgodfrey Jan 19 at 18:45
  • 3
    $\begingroup$ Perhaps pi is π? $\endgroup$ – Rohit Namjoshi Jan 19 at 19:01
  • 1
    $\begingroup$ First simplify: $-\pi a/c = y$ and $b/a = r$ to get: $$e^y + e^{ry} = 1.$$ $\endgroup$ – David G. Stork Jan 20 at 1:37
  • $\begingroup$ values of a and b are known and i want a numerical value for c (maybe through iteration) $\endgroup$ – Shikha Sinha Jan 20 at 8:21
  • $\begingroup$ @DavidG.Stork kindly elaborate, how to solve beyond this. $\endgroup$ – Shikha Sinha Jan 22 at 14:30
7
$\begingroup$

It does not look possible to solve this for general a, b. But for specific values of these, Mathematica can solve it for c

enter image description here

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.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ value of a= 1.414 and value of b=3.928. i need a numerical value for c. Please help me accordingly $\endgroup$ – Shikha Sinha Jan 20 at 12:30
  • $\begingroup$ @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. $\endgroup$ – Nasser Jan 20 at 16:40
1
$\begingroup$

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[2]}}

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

{{c -> 11.1144}}

|improve this answer|||||
$\endgroup$
0
$\begingroup$

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}}    *)

enter image description here

|improve this answer|||||
$\endgroup$

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