How to solve transcendental equation?

9 views (last 30 days)
SHANKAR AENAGANDULA
SHANKAR AENAGANDULA on 14 Aug 2020
Commented: Walter Roberson on 19 Aug 2020
x1=0.1717 - 0.0638i
how to find x : tan(x)/x = x1
x is a complex number

Answers (1)

Walter Roberson
Walter Roberson on 14 Aug 2020
f(x) == c implies that f(x) - c = 0. You can construct the expression f(x)-c and use it with a root-finding function such as fsolve. Just be sure to give an initial point that is complex valued.
You cannot use fzero for this purpose however. fzero cannot deal with complex values.
The method I gave is not necessarily the best one. You can often do better by splitting up the input x into a vector of two real values. In the calculation you would reconstruct the complex value by using complex() or by (real + 1i*imaginary). You would calculate with that. Then you would use real() and imag() to split it into two real values and return them.
fzero cannot deal with this situation because it can only deal with one real input (and no complex component) but fsolve can deal with it.
Splitting into real and imaginary components is mathematically often easier for root finders to deal with.
  13 Comments
Walter Roberson
Walter Roberson on 18 Aug 2020
Suppose that I asked you to solve for the root of a complex-valued equation, so f(z) = 0 is being looked for. Is there any f(z) = 0 such that real(f(z)) ~= 0 -- is it possible for a complex value to equal 0 when its real part is non-zero? Is there any f(z) = 0 such that imag(f(z)) ~= 0 -- is it possible for a complex value to equal 0 when its imaginary portion does not equal 0?
So if you have f(z) = 0 and f(z) is complex valued is that really just a single equation, or is it really the pair of equations [real(f(z)) = 0, imag(f(z)) = 0] ?
Walter Roberson
Walter Roberson on 19 Aug 2020
My tests show that there are no z that satisfy both equations simultaneously.
If you plot the surface defined by abs() of the difference of the two equations, then that surface would be 0 at the point where the two equations are equal. If there are solutions to both equations simultaneously, then both equations would be 0 at the points of solution, and so both equations would be equal to each other at those points. Therefore any solutions to the two equations being equal must be a subset of the solutions to abs() of their difference being 0.
When you look at the plot of the difference, you can find three areas where the two equations might be zero. Using approximations of them from the graph as seeds, we can find that the two equations are equal at only three locations that are approximately
-7.434567016 - 10.84030833*I
-2.971210845 + 5.866746641*1i
2.388387229 - 2.524573595*1i
However, at those locations, the equations are not especially close to zero, being (in order)
1.665792984 - 4.553523447*I
0.7774697970 + 2.885234165*I
1.376375848 - 1.569379529*I
Again, for there to be simultaneous solutions to the two equations, the difference between the two equations would have to equal 0 and the individual equations would have to be 0 at the location.
Actually now that I have extended the search to +/- 50 Pi I see there might be some additional points where the two equations are equal. However:
If you plot abs() of each of the equations individually, you will see that they each have a single point where they might be 0, and in both cases those single points are "near" to 0. With the two equations each having only a single solution, then for the two equations to have simultaneous solutions, the single solution to each of them would have to be the same. But they are not. The first one has a root at 0.9658822712 + 0.5494187667*1i and the second one has a root at 1.018072372 + 0.5528635790*1i -- the roots are close to each other, but not the same place.
There is no simultaneous solution; if there were then it would have to be among the three possibilities listed above (we can constrain to those by approximate range from graphing.)
The surfaces here were generated by splitting the real and imaginary parts of z, z = zr + 1i*zi and doing a 2D plot varying zr independently of zi .
No solution.

Sign in to comment.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!