I was solving the Helmholtz equation using Mathematica and got as an output an expression which is a summation. I first want to turn this expression into a function of $x$ and $y$. I then want to use Mathematica to plot this function in the domain $D=[-3,3] \times [-3,3]$ but I cannot figure out how to do this. My code to produce the expression is:
eqn = Laplacian[bottom[x, y], {x, y}] + bottom[x, y] == 0;
bc4 = {bottom[-3, y] == 0, bottom[3, y] == 0,
bottom[x, -3] == Sin[(\[Pi]x)/6] - Csc[3/Sqrt[2]] Sin[x/Sqrt[2]],
bottom[x, 3] == 0};
sol4 = DSolveValue[{eqn, bc4}, bottom[x, y], {x, y}] // FullSimplify
This outputs:
Inactive[Sum][-((2 Csch[Sqrt[-36 + \[Pi]^2 K[1]^2]] ((-1)^K[1] (1 +
(-1)^K[1]) \[Pi]^2 K[1]^2 - (-1 + (-1)^K[1]) (-18 + \[Pi]^2 K[1]^2)
Sin[\[Pi]x/6]) Sin[1/6 \[Pi] (3 + x) K[1]] Sinh[1/6 (-3 + y) Sqrt[-36
+ \[Pi]^2 K[1]^2]])/(\[Pi] K[1] (-18 + \[Pi]^2 K[1]^2))), {K[1], 1, \
[Infinity]}]
Now I tried using:
ans[x_,y_] = Evaluate[sol4];
Plot3D[answer, {x, -3, 3}, {y, -3, 3}, ColorFunction -> "TemperatureMap"]
But the plot that's produced just shows nothing. I'm assuming my issue is that the Evaluate function isn't doing what I want it to do but I'm not quite sure what else to use - any thoughts? Do I need to activate the summation?
Plot3D[Evaluate[Activate[sol4 /. Infinity -> 10]], {x, -3, 3}, {y, -3, 3}, ColorFunction -> "TemperatureMap"]
instead to see an approximation. $\endgroup$bottom[x, -3]
condition as currently written is faulty, apparently. Don't forget to separate multiplied variables with a space!bottom[x, -3] == Sin[(π x)/6] - Csc[3/Sqrt[2]] Sin[x/Sqrt[2]]
$\endgroup$