# How Can I Visualize a PDE Boundary Condition? [closed]

I want to use Mathematica to visualize boundary/initial conditions for PDEs in 3-dimensional space. This was sparked by the initial comment in this question, which attempts to solve the PDE $$\bigtriangleup u = 0,\ u(1,\ \theta) = 2\pi\theta - \theta^2$$

As a workaround, I created a 2-dimensional graph in Desmos...

1. I assume the way to determine from a 2-dimension graph like this that the boundary condition is continuous from $$0$$ to $$2\pi$$ is to note that the green line is continuous and that its endpoints are the same. By contrast, the red line is also continuous, but its endpoints are not the same, so the boundary condition is not continuous from $$-\pi$$ to $$\pi$$. This is based on the idea of wrapping each of these intervals around the cylinder. Is this the right way to imagine visualizing such a boundary condition, depending on which interval is given by the problem statement?

2. How can I actually graph the boundary condition in 3-dimensional space without knowing the solution to the PDE?

• How can I actually graph the boundary condition in 3-dimensional space without knowing the solution to the PDE? Why do you need the solution to plot the boundary conditions? Since boundary condition are given, Right? Sep 27 '21 at 17:41

To plot the BC only, you do not need the solution, as BC is given. One way to plot the BC is

bcf = 2*Pi*theta - theta^2;
ParametricPlot3D[{r Cos[theta], r Sin[theta], bcf}, {r, 1 - .01,
1 + .01}, {theta, 0, 2 Pi}, BoxRatios -> {1, 1, 1}]


If using $$-\pi<\theta<\pi$$ range, instead of $$0<\theta<2 \pi$$ then BC will look like this

bcf = 2*Pi*theta - theta^2;
ParametricPlot3D[{r Cos[theta], r Sin[theta], bcf}, {r, 1 - .01,
1 + .01}, {theta, -Pi, Pi}, BoxRatios -> {1, 1, 1}]