Message Boards Message Boards

0
|
3298 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Solving a complicated expression in xyz?

Posted 3 years ago

I attached a file containing a very complicated expression in xyz. I need to solve this expression (and other similar expressions) for z over a grid of xy points, then plot the xyz data. I have tried Solve, NSolve and FindRoot but none of them worked. One piece of information I know is that the solver should return several solutions. However, I cannot get any of the three solvers to work.

Any help would be appreciated. Note: I edited the question and added a new file.

Attachments:
POSTED BY: eft rsd
5 Replies
Posted 3 years ago

The solution should be real. I have tried for a long time to solve this but nothing seems to work.

Regrading plotting, I can plot the function using ContourPlot3D but it is not the plot I need to construct.

Thanks for trying Gianluca.

POSTED BY: eft rsd

I tried ContourPlot3D with a simplified expression:

fun2 = (0.06155011100890895` E^(-1.568` Sqrt[(0.03491308437591544` + 
          x)^2 + (-2.689080275342471` + y)^2 + (-6.14261034842153` + 
          z)^2]) (-6.14261034842153` + z) + 
     0.06155011100890895` E^(-1.568` Sqrt[(-2.34626837345019` + 
          x)^2 + (-1.3143045196772232` + y)^2 + (-6.14261034842153` + 
          z)^2]) (-6.14261034842153` + z) + 
     0.06155011100890895` E^(-1.568` Sqrt[(-2.34626837345019` + 
          x)^2 + (1.3143045196772232` + y)^2 + (-6.14261034842153` + 
          z)^2]) (-6.14261034842153` + z) + 
     0.06155011100890895` E^(-1.568` Sqrt[(0.03491308437591544` + 
          x)^2 + (2.689080275342471` + y)^2 + (-6.14261034842153` + 
          z)^2]) (-6.14261034842153` + z) + 
     0.06155011100890895` E^(-1.568` Sqrt[(2.311355289074275` + 
          x)^2 + (-1.3747757556652478` + y)^2 + (-6.142610348421529` +
           z)^2]) (-6.142610348421529` + z) + 
     0.06155011100890895` E^(-1.568` Sqrt[(2.311355289074275` + 
          x)^2 + (1.3747757556652478` + y)^2 + (-6.142610348421529` + 
          z)^2]) (-6.142610348421529` + z) - 
     0.18295061484228567` E^(-1.568` Sqrt[(-4.121096242270598` + 
          x)^2 + (-2.689080275342471` + y)^2 + (-4.555156043204127` + 
          z)^2]) (-4.555156043204127` + z) - 
     0.18295061484228567` E^(-1.568` Sqrt[(-4.121096242270598` + 
          x)^2 + (2.689080275342471` + y)^2 + (-4.555156043204127` + 
          z)^2]) (-4.555156043204127` + z) - 
     0.18295061484228567` E^(-1.568` Sqrt[(-0.268263710126934` + 
          x)^2 + (-4.913514174918163` + y)^2 + (-4.555156043204126` + 
          z)^2]) (-4.555156043204126` + z)) - Sqrt[Ic];
ContourPlot3D[fun2 == 0, {x, -10, 10}, {y, -10, 10}, {z, -10, 10}]
POSTED BY: Gianluca Gorni

What do you mean by "solving" an expression? For example, what would you do with this simplified expression:

fun = (E^- Sqrt[x^2 + (-2 + y)^2 + (-6 + z)^2] (-6 + z))^2 - Ic
POSTED BY: Gianluca Gorni
Posted 3 years ago

Thanks Gianluca Gorni for replying. I edited the file to add an example of what I need to do. In short, I need to find the value ( or values) of z that satisfies Expression in (x,y,z) - Ic=0. Solve (which I put in the notebook), NSolve and FindRoot none of them work.

POSTED BY: eft rsd
Posted 3 years ago

I took the first term in fun and tried Solve and Reduce

funPart = (0.` + 
     0.06155011100890895` E^(-1.568` Sqrt[(0.03491308437591544` + 
          x)^2 + (-2.689080275342471` + y)^2 + (-6.14261034842153` + 
          z)^2]) (-6.14261034842153` + z) + 
     0.06155011100890895` E^(-1.568` Sqrt[(-2.34626837345019` + 
          x)^2 + (-1.3143045196772232` + y)^2 + (-6.14261034842153` + 
          z)^2]) (-6.14261034842153` + z))^2 - Ic

Solve[Rationalize[funPart /. {x -> 0, y -> 0}, 0] == 0, z]

Solve::nsmet: This system cannot be solved with the methods available to Solve.

Same for Reduce. So I doubt there is an analytic solution for the whole expression.

FindInstance is able to find specific values of z that satisfy the equation. Note that they are complex.

FindInstance[(funPart /. {x -> 0, y -> 0}) == 0, z, 2]
(* {{z -> 1.75527 - 79.1511 I}, {z -> 10.2489 - 51.1102 I}} *)
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract