1

Cross-posted in Wolfram Community.


Here, I intend to plot a 3D picture of

enter image description here

with two implicit functions

enter image description here

where $x, y, t, \xi, \eta$, are variables. Of course, these variables can be constrained to certain interval that will guarantee the function to be well-posed. My code is attached below.

How can I draw this one?

x == ξ - 0.5 Tanh[ξ - 0.3 t] - Tanh[ξ - 0.1 t] - 
   1.5 Tanh[ξ + 0.1 t];

y == η - 1.5 Tanh[η];

Plot3D[-(( 1350.Sech[η]^2 Tanh[η] (1. Sech[0.1 t - ξ]^2 Tanh[ 0.1 t - ξ] + 0.6Sech[0.3 t - ξ]^2 Tanh[0.3 t - ξ] + 1.6 Sech[0.1 t + ξ]^2 Tanh[0.1 t + ξ]))/((1 - 1.5 Sech[η]^2) (1 - Sech[0.1 t - ξ]^2 - 0.5 Sech[0.3 t - ξ]^2 - 1.5 Sech[0.1 t + ξ]^2) (0.3 Sech[η]^2 + 0.5 Sech[0.1 t - ξ]^2 + 0.3 Sech[0.3 t - ξ]^2 - 0.8` Sech[0.1 t + ξ]^2)^2)), {x, -12, 12}, {y, -12, 12}, AxesLabel -> {Style[x, Medium], Style[y, Medium]}]

xzczd
  • 65,995
  • 9
  • 163
  • 468
InFei
  • 115
  • 4
  • 1
    Many issues with your syntax. Your == statements are not assignment statements; they are boolean statements: x and y will not be assigned a value. Your Plot3D is not a function of x and y so nothing will plot. – Edmund Jan 09 '22 at 04:29
  • Thank you for your reply. However, even ==" is replaced by=", it can not work too. Here, ``x == ξ - 0.5 Tanh[ξ - 0.3 t] - Tanh[ξ - 0.1 t] - 1.5 Tanh[ξ + 0.1 t]; y == η - 1.5 Tanh[η];'' means two constrains, particualy. – InFei Jan 09 '22 at 05:01
  • As @Edmund said, the function you are trying to plot is a function of t, ξ and η and not x and y. This means that unless they are in turn functions of x and y you cannot plot them as a function ofx and y. In order to give a 3D plot you would also need to fix one of the variables i.e. t, or ξ . – Dunlop Jan 09 '22 at 06:24
  • 1
    It is exactly the point that \xi and \eta can not be solved analytically, which cause the problem. – InFei Jan 09 '22 at 07:28
  • 1
    CrossPost: https://community.wolfram.com/groups/-/m/t/2440625 – Mariusz Iwaniuk Jan 09 '22 at 13:32
  • My old answer might be related. Basically you can plot your main function against ξ and η, then use your x == f[ξ] and y == g[η] relationship (maybe through Plot or numerical procedure) to remap ξ, η coordinates to x, y in the previously finished 3D surface graphic (say through ReplaceAll). – Silvia Aug 19 '22 at 17:38

0 Answers0