Unraveling the Confusion: Mistakes in Solving PDEs in Spherical Coordinates?

In summary, the given PDE and initial and boundary conditions are solved using the separation of variables method. The basis function R(r) is determined to be sqrt(2) * sin(lambda_n * r)/r, with lambda_n = n*pi. However, there seems to be a mistake in the integration by parts routine, as the final answer does not match the one given by Mathematica. Further clarification is needed for the boundary conditions and the purpose of the integral.
  • #1
member 428835
Given the PDE $$f_t=\frac{1}{r^2}\partial_r(r^2 f_r),\\
f(t=0)=0\\
f_r(r=0)=0\\
f(r=1)=1.$$
We let ##R(r)## be the basis function, and is determined by separation of variables: ##f = R(r)T(t)##, which reduces the PDE in ##R## to satisfy $$\frac{1}{r^2 R}d_r(r^2R'(r)) = -\lambda^2:\lambda^2 \in \mathbb{R}.$$ To ensure ##R## is orthonormal and satisfies the ODE we find ##R = \sqrt{2} \sin (\lambda_n r)/r:\lambda_n = n\pi## (note we let ##R(0)=R(1)=0##). What happens next I find very confusing:
$$
\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 f_r) \right)\, dr = r^2R f|_{r=0}^{r=1}-\int_0^1R'(r)r^2f_r \, dr\\
= -R'(r)r^2 f|_{r=0}^{r=1}+\int_0^1 \partial_r(r^2 R'(r))f \, dr\\
= -\sqrt{2} \lambda_n (-1)^n-\lambda_n^2 T(t).
$$

However, noting that ##f = R(r)T(t)## and that ##R(r) = \sqrt{2} \sin (\lambda_n r)/r##, Mathematica gives me $$T(t)\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 R'(r)) \right)\, dr = -\lambda_n^2T(t).$$ So, where's my mistake?
 
Physics news on Phys.org
  • #2
It is difficult to check your work, because I don't know what might be standard nomenclature in the first line of the OP represents. What is ## f_t ## and ## f_r ##?
 
  • #3
It is difficult to check your work, because I don't know what might be standard nomenclature in the first line of the OP represents. What is ## f_t ## and ## f_r ##?
 
  • #4
Charles Link said:
It is difficult to check your work, because I don't know what might be standard nomenclature in the first line of the OP represents. What is ## f_t ## and ## f_r ##?
Sorry, ##f_r = \partial f / \partial r## and ##f_t = \partial f / \partial t##.
 
  • #5
Additional question then: Does ## f_r(r=0) ## imply ## f_r(r=0) ## for all ## t ##?
 
  • #6
joshmccraney said:
Given the PDE $$f_t=\frac{1}{r^2}\partial_r(r^2 f_r),\\
f(t=0)=0\\
f_r(r=0)=0\\
f(r=1)=1.$$
We let ##R(r)## be the basis function, and is determined by separation of variables: ##f = R(r)T(t)##, which reduces the PDE in ##R## to satisfy $$\frac{1}{r^2 R}d_r(r^2R'(r)) = -\lambda^2:\lambda^2 \in \mathbb{R}.$$
Hi Josh,

Here's my first problem.
Solving for T(t), we find ##T(t)=Ce^{-\lambda^2 t}##.
However, that implies that ##f(t=0)\ne 0## for some r, which contradicts the first boundary condition.
Is there a typo?

To ensure ##R## is orthonormal and satisfies the ODE we find ##R = \sqrt{2} \sin (\lambda_n r)/r:\lambda_n = n\pi## (note we let ##R(0)=R(1)=0##).
If we set R(0)=0, that implies that f(r=0)=0, but that is not a given boundary condition.
Are we missing this boundary condition?

If we set R(1)=0, that implies that f(r=1)=0, but that contradicts the boundary condition f(r=1)=1.
Another typo in the boundary conditions?

For ##\lambda_n=n\pi##, we find ##R(1)\ne 0##.
Can it be that ##\lambda_n=\frac{n\pi}{r}## was intended?
 
  • #7
joshmccraney said:
$$
\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 f_r) \right)\, dr = r^2R f|_{r=0}^{r=1}-\int_0^1R'(r)r^2f_r \, dr\\
= -R'(r)r^2 f|_{r=0}^{r=1}+\int_0^1 \partial_r(r^2 R'(r))f \, dr\\
= -\sqrt{2} \lambda_n (-1)^n-\lambda_n^2 T(t).
$$

However, noting that ##f = R(r)T(t)## and that ##R(r) = \sqrt{2} \sin (\lambda_n r)/r##, Mathematica gives me $$T(t)\int_0^1 r^2 R(r) \left( \frac{1}{r^2}\partial_r(r^2 R'(r)) \right)\, dr = -\lambda_n^2T(t).$$ So, where's my mistake?

Continuing from the 3rd step:
$$-R'(r)r^2 f|_{r=0}^{r=1}+\int_0^1 \partial_r(r^2 R'(r))f \, dr
=\int_0^1 -\lambda^2r^2R(r)\cdot T(t)R(r)\,dr
=-\lambda^2 T(t) \int_0^1 r^2 \left(\frac{\sqrt 2\sin(\lambda r)}{r}\right)^2\,dr \\
=-\lambda^2 T(t) \int_0^1 2\sin^2(\lambda r)\,dr
=-\lambda^2 T(t) \int_0^1 (1-\cos(\lambda r))\,dr
=-\lambda^2 T(t) (r-\frac 1\lambda\sin(\lambda r))\Big|_0^1
=-\lambda^2 T(t)
$$
In other words, it seems to me that the given 4th step is wrong, and that Mathematica's solution is quite correct.
Then again, it's not clear to me what the integral is supposed to represent (nor if there are typos in the boundary conditions).
Can you clarify?
 
  • #8
Charles Link said:
Additional question then: Does ## f_r(r=0) ## imply ## f_r(r=0) ## for all ## t ##?
Yes, ##f_r(r=0) = f_r(r=0,t)##.
I like Serena said:
Hi Josh,

Here's my first problem.
Solving for T(t), we find ##T(t)=Ce^{-\lambda^2 t}##.
However, that implies that ##f(t=0)\ne 0## for some r, which contradicts the first boundary condition.
Is there a typo?
No typo.

I like Serena said:
If we set R(0)=0, that implies that f(r=0)=0, but that is not a given boundary condition.
Are we missing this boundary condition?
No we are not missing the boundary condition.

I like Serena said:
If we set R(1)=0, that implies that f(r=1)=0, but that contradicts the boundary condition f(r=1)=1.
Another typo in the boundary conditions?
Not a typo.

Charles Link said:
For ##\lambda_n=n\pi##, we find ##R(1)\ne 0##.
Can it be that ##\lambda_n=\frac{n\pi}{r}## was intended?
No, the eigenvalue ##\lambda## is assumed a constant, else separation of variables fails. Notice ##\lambda = n\pi\implies R(0)=R(1)=0## since ##\sin(n\pi)=0##.

Let me explain: I am learning a weird technique for solving certain Sturm-Louiville problems in spherical coordinates. I did not want to post the entire problem here since it is in my notes. I can post the entire solution as the professor solved it, but the part that was confusing me was shown in the integration by parts routine. Specifically, I was unsure how it was working out.
 
  • Like
Likes Charles Link
  • #9
I like Serena said:
Continuing from the 3rd step:
$$-R'(r)r^2 f|_{r=0}^{r=1}+\int_0^1 \partial_r(r^2 R'(r))f \, dr
=\int_0^1 -\lambda^2r^2R(r)\cdot T(t)R(r)\,dr
=-\lambda^2 T(t) \int_0^1 r^2 \left(\frac{\sqrt 2\sin(\lambda r)}{r}\right)^2\,dr \\
=-\lambda^2 T(t) \int_0^1 2\sin^2(\lambda r)\,dr
=-\lambda^2 T(t) \int_0^1 (1-\cos(\lambda r))\,dr
=-\lambda^2 T(t) (r-\frac 1\lambda\sin(\lambda r))\Big|_0^1
=-\lambda^2 T(t)
$$
In other words, it seems to me that the given 4th step is wrong, and that Mathematica's solution is quite correct.
Then again, it's not clear to me what the integral is supposed to represent (nor if there are typos in the boundary conditions).
Can you clarify?
I don't think this is correct. Let's evaluate each component of
$$
-R'(r)r^2 f|_{r=0}^{r=1}+\int_0^1 \partial_r(r^2 R'(r))f \, dr\\
-R'(r)r^2 f|_{r=0}^{r=1} = \sqrt{2} (n \pi r \cos(n \pi r) - \sin(n \pi r) f|_{r=0}^{r=1}\\
=\sqrt{2} n \pi r \cos(n \pi r) f|^{r=1}\\
=\sqrt{2} n \pi (-1)^n.
$$
The integral ##\int_0^1 \partial_r(r^2 R'(r))f \, dr##, as you show, comes out to ##-\lambda_n^2 T(t)##. Then the total expression is ##\sqrt{2} \lambda_n(-1)^n-\lambda_n^2 T(t)##. Why is there a difference?
 
  • #10
I was working under the assumption we had R(1)=0 implying that f(r=1)=0.

Now I think that should be R'(1)=0, which does match the boundary conditions.
Consequently we should have ##\lambda_n=n\pi/2##, after which the integral also makes sense.
 
  • #11
I like Serena said:
I was working under the assumption we had R(1)=0 implying that f(r=1)=0.

Now I think that should be R'(1)=0, which does match the boundary conditions.
Consequently we should have ##\lambda_n=n\pi/2##, after which the integral also makes sense.
Here's the 5 pages of notes. My problem starts at the end of page 4 and continues into 5. Have a look and let me know what you think.

edit: you don't need to reference the first two pages!
 

Attachments

  • spherical.pdf
    568.4 KB · Views: 291
Last edited by a moderator:
  • #12
joshmccraney said:
Here's the 5 pages of notes. My problem starts at the end of page 4 and continues into 5. Have a look and let me know what you think.

edit: you don't need to reference the first two pages!

Those notes are quite a mess. :rolleyes:

Anyway, I think the key is that we have R(1)=0 while f(r=1)=1.
With f(r,t)=T(t)R(r) that's a direct contradiction, so we have to ignore that we were doing separation of variables, and assume we know nothing about f, except what is given in the problem statement.
As soon as we tell Mathematica that f(r,t)=T(t)R(r), it will evaluate the first term as 0.
But if we use the boundary condition f(r=1)=1, the first term becomes ##\sqrt 2 n\pi(-1)^n##.

Btw, from your notes I deduce that the boundary condition ##f_r(r=0)=0## is not used.
Instead we have the boundary condition ##f(r=0)=\text{finite}##, and due to the form of the solution for R(r), we conclude that R(0)=0.
This should imply that ##f(r=0)=0##, but I'm guessing we cannot assume that either.
Apparently separation of variables is only used as some kind of guess to get going.
 
  • #13
I like Serena said:
Those notes are quite a mess. :rolleyes:
Yes, I totally agree! Notes are so confusing and terrible! I'm going to go in and ask the professor about the apparent contradiction today, because it seems so so so wrong! Will update on his response.
 

1. What are PDEs in spherical coordinates?

PDEs (Partial Differential Equations) in spherical coordinates are mathematical equations that involve partial derivatives with respect to variables in a spherical coordinate system, such as radius, latitude, and longitude. These equations are commonly used in physics and engineering to describe physical phenomena in three-dimensional space.

2. What is the difference between PDEs in spherical coordinates and Cartesian coordinates?

The main difference between PDEs in spherical coordinates and Cartesian coordinates is the coordinate system used. In Cartesian coordinates, the variables are x, y, and z, representing positions along the x, y, and z axes, respectively. In spherical coordinates, the variables are r, θ, and φ, representing radius, polar angle, and azimuthal angle, respectively. PDEs in spherical coordinates also have different forms and solutions compared to those in Cartesian coordinates due to the different coordinate systems.

3. What are some common applications of PDEs in spherical coordinates?

PDEs in spherical coordinates are commonly used in many fields, such as electromagnetics, fluid mechanics, astrophysics, and geophysics. They are particularly useful for solving problems involving spherical objects or systems, such as planetary motions, ocean currents, and electromagnetic fields around spherical conductors or antennas.

4. How are boundary conditions and initial conditions handled in PDEs in spherical coordinates?

Boundary conditions and initial conditions are handled in a similar way as in PDEs in Cartesian coordinates. However, in spherical coordinates, the boundary conditions are typically specified in terms of the radius, polar angle, or azimuthal angle, rather than the x, y, or z coordinates. The initial conditions are also specified in terms of these spherical coordinates at an initial time.

5. Are there any software tools available for solving PDEs in spherical coordinates?

Yes, there are many software tools available for solving PDEs in spherical coordinates, such as COMSOL, ANSYS, and MATLAB. These tools provide user-friendly interfaces and powerful solvers for various PDE problems, including those in spherical coordinates. They also offer advanced features for visualizing and analyzing the solutions, making them useful for both research and industrial applications.

Similar threads

  • Differential Equations
Replies
3
Views
2K
Replies
1
Views
1K
  • Differential Equations
Replies
6
Views
2K
  • Differential Equations
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
10
Views
261
  • Differential Equations
Replies
1
Views
770
  • Calculus and Beyond Homework Help
Replies
1
Views
763
  • Differential Equations
Replies
4
Views
4K
  • Special and General Relativity
Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
799
Back
Top