Find the real zeros of a complex equation

  • Context: Mathematica 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Complex Complex equation
Click For Summary

Discussion Overview

The discussion revolves around finding the real zeros of a complex equation involving hyperbolic functions and complex coefficients. Participants explore various methods for solving the equation, including numerical approaches and the quadratic formula, while addressing challenges encountered in Mathematica.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Mathematical reasoning

Main Points Raised

  • One participant presents a complex equation and notes difficulties in identifying the first zero of its real component, despite successful plotting.
  • Another participant suggests a simpler version of the equation and provides a method for plotting solutions in Mathematica, but expresses uncertainty about locating zeros numerically.
  • There is a discussion about the applicability of the quadratic formula, with one participant questioning its use in this context.
  • Another participant mentions that Mathematica does not provide an output for the real part of the solution when using the quadratic formula.
  • A suggestion is made to use the FindRoot function to locate the zeros of the real part of the function.
  • One participant reports success in finding zeros by taking the determinant, indicating it aligns with their objectives.
  • Confusion arises regarding the functionality of the original equation in Mathematica, with one participant initially unable to replicate a successful output but later resolves the issue.

Areas of Agreement / Disagreement

Participants express various methods and approaches to solving the problem, but there is no consensus on the most effective technique. Some methods are successful for certain participants while others encounter difficulties, indicating ongoing exploration and debate.

Contextual Notes

Limitations include the dependence on Mathematica's capabilities to handle complex equations and the potential for miscommunication regarding the input format. The discussion also reflects varying levels of familiarity with numerical methods and the quadratic formula.

member 428835
Hi PF!

Here's my equation
Code:
0.5 Sech[0.997091 Sqrt[
   2.4674 + \[Xi]\[Xi]^2]] (-1. ((0. +
        3.7011 I) + (0. + 1.5 I) \[Xi]\[Xi]^2) Cosh[
     0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]] -
   1. \[Sqrt](((0. + 3.7011 I) + (0. + 1.5 I) \[Xi]\[Xi]^2)^2 Cosh[
         0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]]^2 +
       4. (2.4674 + \[Xi]\[Xi]^2)^(3/2)
         Cosh[0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]] Sinh[
         0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]]))
Making it real, it plots well, but I cannot identify the first zero of the real component of the equation. NSolve and Reduce fail, though it plots so clearly.

Thanks for your time!
 
Last edited by a moderator:
Physics news on Phys.org
joshmccraney said:
Hi PF!

Here's my equation
Code:
0.5 Sech[0.997091 Sqrt[
   2.4674 + \[Xi]\[Xi]^2]] (-1. ((0. +
        3.7011 I) + (0. + 1.5 I) \[Xi]\[Xi]^2) Cosh[
     0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]] -
   1. \[Sqrt](((0. + 3.7011 I) + (0. + 1.5 I) \[Xi]\[Xi]^2)^2 Cosh[
         0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]]^2 +
       4. (2.4674 + \[Xi]\[Xi]^2)^(3/2)
         Cosh[0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]] Sinh[
         0.997091 Sqrt[2.4674 + \[Xi]\[Xi]^2]]))
Making it real, it plots well, but I cannot identify the first zero of the real component of the equation. NSolve and Reduce fail, though it plots so clearly.

Thanks for your time![/CODE]
Can you please write this out using LaTex, and also provide the plot you obtained?
 
Chestermiller said:
Can you please write this out using LaTex, and also provide the plot you obtained?
Yea, I left it like this because it should be easy to plot in Mathematica via copy-paste. However, here's a much simpler version:

Code:
a = -5;
c = 1;
sol[bb_] := x /. NSolve[a x^2 + b I x + c == 0, x]
Plot[{Re[sol[bb]], Im[sol[b]]}, {b, -10, 10}, PlotRange -> All]

The equation is ##ax^2+b i x + c##. The plot attached (yellow is imaginary and blue is real solution).

I don't know how to locate the zeros numerically in Mathematica. Any idea?
 

Attachments

This is probably a stupid question, but why can't you just use the quadratic formula?
 
Chestermiller said:
This is probably a stupid question, but why can't you just use the quadratic formula?
It's not stupid, but Mathematica does not give me an output when I ask for the real part of the solution. Example:

Code:
sol[b_] := (-b I \[PlusMinus] Sqrt[-b^2 - 4 a c])/(2 a)
Re[sol[1]]

it outputs ##-Re[-i \pm \sqrt{19}]/10## (using values listed above).
 
Calling f[x] the function you defined in the OP, try
Code:
FindRoot[Re[f[x]], {x, 0.4}]
 
  • Like
Likes   Reactions: member 428835
Solving it using the quadratic formula, I get $$x=\frac{bi\pm \sqrt{20-b^2}}{10}$$
What's wrong with that?
 
The FindRoot did not work for me, but I appreciate your help Dr Claude. Chet, The issue is having Mathematica grab the real and imaginary component of the quadratic solution. What I ended up doing is taking the determinant and finding the zeros of this. Turns out this is equivalent to what I'm looking for.

Thanks for the help everyone!
 
joshmccraney said:
The FindRoot did not work for me
I'm confused. I copied and pasted your equation in #1 and it worked fine.
 
  • Like
Likes   Reactions: member 428835
  • #10
DrClaude said:
I'm confused. I copied and pasted your equation in #1 and it worked fine.
Oops, I must have copied something wrong, because now it does in fact work. Thanks!
 
  • Like
Likes   Reactions: DrClaude

Similar threads

Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
3K