Say I have a function that I solved from a differential equation in 2-dimensions because I know in advance that there is cylindrical symmetry in the solution. For instance, say we obtain the solution:


How would one go about turning this "slice" of a three-dimensional cylindrically symmetric function into its full three-dimensional form?

The function above should describe this three dimensional function along any plane that goes through the x axis. I feel like there should be an easy solution but I'm just not seeing it.

  • 1
    $\begingroup$ f[x_, y_, z_] := f[x_, z_]? Or g[x_, y_, z_] := f[x_, z_], if you want less confusion. Is that what you mean? $\endgroup$
    – Michael E2
    Jul 25, 2022 at 21:49
  • $\begingroup$ thanks for the response! but i dont think thats what i mean. the full 3D function should reduce down to the 2D function listed above along every plane that crosses the x axis. $\endgroup$
    – burntclaw
    Jul 25, 2022 at 21:53
  • $\begingroup$ I don't know what you mean by a 3D function or a 2D function, I guess. Give an example of a function that reduces "down to the 2D function listed above along every plane that crosses the x axis." I think mine does it, but you say it doesn't. Thus I must be misunderstanding something. $\endgroup$
    – Michael E2
    Jul 25, 2022 at 22:03
  • 1
    $\begingroup$ Some test cases would help. As you've written this, I see @MichaelE2's suggestion as matching your requirement exactly. $\endgroup$
    – lericr
    Jul 25, 2022 at 22:17
  • $\begingroup$ maybe a lower dimensional case would help? for example, if i know that a 2D solution to a PDE has cylindrical symmetry, i would exploit that by solving the PDE in 1 dimension along a line going through the origin. for instance, say the 1D solution i get is f[x_]=Abs[x]. Then when I project it back into its original 2D form, it would become a cone, f[x_,y_]=Sqrt[x^2+y^2] because if you plot the cone along a line going through the origin you will get back f[x_]=Abs[x]. i dont know if this helps. im really bad at explaining things, so please let me know if that made sense! $\endgroup$
    – burntclaw
    Jul 25, 2022 at 22:21

1 Answer 1


I assume OP uses the "standard" convention where the cylindrical axis is the $z$-axis. Cylindrical symmetry means that the function does not depend on the azimuth $\varphi$.

If f[x_,z_] is the restriction of some function f[x_,y_,z_] to the $x \geq 0$ part of the $xz$-plane, and if f[x_,y_,z_] is cylindrically symmetric, then it is given by


Note that I am using the same symbol f to denote two different things, which in Mathematica is no problem because it can distinguish things with 2 arguments and things with 3 arguments.

Example. Suppose the restriction to the $x \geq 0$ part of the $xz$-plane is known ("slice"):

f[x_,z_] := x^2+z^2;

Then the original, cylindrically symmetric function is

(* x^2+y^2+z^2 *)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.