As I posted in Parametric Plot 3D error in heat equation in polar coordinates They tried to explain me but I have confused worst now.
So the problem is the following
We know that f(r)=J_0(x_{01}r), where x_{01} is the first positive root of the Bessel Function and a=v=1
Solution
Now we solve the problem with the method separation of variables.
Let
Then,
We divide both sides with R(r)T(t).
Thus,
So we have the following two equations
It is Sturm Liouville problem, from which we can conclude
the weight function is w=r. We change variables x=k \cdot r then we obtain
The equation (2) has as solution the Bessel function \bar{R}=J_0(x)=J_0(kr).
The boundary condition u(a,t)=0, t \geq 0 become R(a)=0, so J_0(ka)=0. That means k \cdot a must be the root of the Bessel function with zero order.
Now W'(t)+\lambda W(t)=0 has general solution
Then we have
Now from superposition, the general solution to the problem will be
and the coefficient will be
Now I am trying to write the Mathematica code
a = 1;
x0[m_] := N[BesselJZero[0, m]]
(*d definition of the function f(r)*)
f[r_] := BesselJ[0, x0[1]*r]
k[m_] := x0[m]/a
(* Computation of the Fourier coefficients*)
d[m_] := (2 \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(a\)]\(r*
BesselJ[0, k[m]*r]\ *f[r] \[DifferentialD]r\)\))/(
a^2*BesselJ[1, x0[m]]^2)
(*Construction of the exact solution*)
u[r_, t_, m_] := d[m]*E^(-k[m]^2*t)*BesselJ[0, k[m]*r]
uapprox[r_, t_] = \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 1\), \(10\)]\(u[r, t, n]\)\);
(*Graph of the exact solution*)
Manipulate[
ParametricPlot3D[{r*Cos[\[Theta]], r*Sin[\[Theta]],
uapprox[r, t]}, {r, 0, 1}, {\[Theta], 0, 2 Pi},
PlotRange -> {-1.2, 1.2}, BoundaryStyle -> Directive[Red, Thick],
ColorFunction -> "SolarColors", Mesh -> True], {t, 0, 10, 0.0001}]
graphs =
Table[ParametricPlot3D[{r*Cos[\[Theta]], r*Sin[\[Theta]],
uapprox[r, t]}, {r, 0, 1}, {\[Theta], 0, 2 Pi},
PlotRange -> {-1.2, 1.2}, BoundaryStyle -> Directive[Red, Thick],
ColorFunction -> "SolarColors"], {t, 0, 2.5, 2.5/8}]
Animate[ParametricPlot3D[{r*Cos[\[Theta]], r*Sin[\[Theta]],
uapprox[r, t]}, {r, 0, 1}, {\[Theta], 0, 2 Pi},
PlotRange -> {-1.2, 1.2}, BoundaryStyle -> Directive[Red, Thick],
ColorFunction -> "SolarColors", Mesh -> True], {t, 0, 10, 0.0001}]
When I try to run ParametricPlot3D gives me. Could anyone explain to me, please, why I received that answer?
