6
$\begingroup$

I have the following equation. Why aren't Solve and Reduce able to find the solution?

Reduce[2 n - Tanh[z] Tanh[2 n z] == 0, z]
$\endgroup$
4
  • $\begingroup$ Welcome to Mathematica.SE! For improved formatting please have a look at the FAQ. $\endgroup$
    – Yves Klett
    Sep 27, 2012 at 13:25
  • $\begingroup$ If you chose individual values for n, Mathematica is capable of solving those cases. $\endgroup$
    – jVincent
    Sep 27, 2012 at 13:32
  • 2
    $\begingroup$ Have you plotted $\tanh(z) \tanh(2 n z)$ for different values of n? This tells you that for $n \in \mathcal{Z}$, a real, unique solution is not possible for your equation. $\endgroup$
    – rcollyer
    Sep 27, 2012 at 13:34
  • $\begingroup$ You could start by plotting the zeros using Manipulate[ ContourPlot[2 n - Tanh[z] Tanh[2 n z] == 0, {z, -z0, z0}, {n, -n0, n0}, ContourStyle -> {Thick, Red}, FrameLabel -> {"z", "n"}], {{n0, 0.66, "n half-range"}, 0.001, 5}, {{z0, 4.3, "z half-range"}, 0.001, 5}] $\endgroup$ Sep 27, 2012 at 15:00

2 Answers 2

9
$\begingroup$

Use this to see numerically what the solution space looks like:

Manipulate[
  ContourPlot[2 n - Tanh[z] Tanh[2 n z] == 0,
    {z, -z0, z0}, {n, -n0, n0}, ContourStyle -> {Thick, Red}, 
    FrameLabel -> {"z", "n"}],
  {{n0, 0.66, "n half-range"}, 0.001, 5},
  {{z0, 4.3, "z half-range"}, 0.001, 5}]

Mathematica graphics

To get an analytic solution (approximation) you can series expand in powers of n about n = 0, n = -1/2 and n = 1/2, then (if you suitably limit the maximum expansion power) you can analytically solve for the zeros of these expansions. However, this approach splits the above solution space into several pieces, and it also generates some "parasitic solutions" that you don't want but are easily discarded.

Anyway, the following code generates a result that is both analytic (but messy) and it closely matches the above solution space (compare the plot above with the plot below):

ser0 = Series[2 n - Tanh[z] Tanh[2 n z], {n, 0, 5}] // Normal;
nsol0 = Solve[ser0 == 0, n];

ser12a = Series[2 n - Tanh[z] Tanh[2 n z], {n, 1/2, 2}] // Normal;
nsol12a = Solve[ser12a == 0, n];

ser12b = Series[2 n - Tanh[z] Tanh[2 n z], {n, -(1/2), 2}] // Normal;
nsol12b = Solve[ser12b == 0, n];

Plot[Join[n /. nsol0, n /. nsol12a, n /. nsol12b] // Evaluate,
  {z, -4, 4}, PlotRange -> {Automatic, {-1, 1}}, PlotStyle -> {Thick}]

Mathematica graphics

$\endgroup$
1
  • 1
    $\begingroup$ I've belatedly realised that I assumed Im[z] = 0, so this "solution" is incomplete. $\endgroup$ Sep 29, 2012 at 11:31
4
$\begingroup$

What's $n$? If it's an integer (or even not) you can solve the system for specific values of $n$.

Table[
 {n, Reduce[2 n - Tanh[z] Tanh[2 n z] == 0, z]},
 {n, 1, 3, 0.1}]
$\endgroup$
3
  • $\begingroup$ I want to solve this problem for any value n. Not integers. The solution is for example like: z=sin (n[Pi])/2)) $\endgroup$
    – user2444
    Sep 27, 2012 at 13:57
  • 3
    $\begingroup$ @ösnuröstunç Well, as already observed, solving for symbolic $n$ is not an option. You can solve for more values of $n$, as I've indicated in an edit, but you simply can't do it for all values of $n$. $\endgroup$ Sep 27, 2012 at 14:00
  • $\begingroup$ In order that Im seeking general solution, I havent this problem solved uptill now. In the last few days I have tried to convert tanhz to tanz. Maybe in this case solving this problem can be easy. $\endgroup$
    – user2444
    Sep 27, 2012 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.