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

Click For Summary

Discussion Overview

The discussion revolves around solving a partial differential equation (PDE) in spherical coordinates, specifically focusing on the boundary conditions and the implications of separation of variables. Participants explore the mathematical steps involved in deriving solutions and express confusion regarding the application of boundary conditions.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant presents a PDE and attempts to solve it using separation of variables, leading to confusion about the integration steps and boundary conditions.
  • Several participants express difficulty in understanding the notation used for the derivatives, specifically ##f_t## and ##f_r##, prompting clarifications.
  • Another participant questions whether the condition ##f_r(r=0)## implies that it holds for all time ##t##.
  • Concerns are raised about the implications of boundary conditions, particularly whether they are correctly stated or if there are typos in the problem setup.
  • Some participants suggest that the derived expressions contradict the boundary conditions, leading to discussions about potential errors in the mathematical steps.
  • There is a proposal that the eigenvalue ##\lambda_n## might need to be re-evaluated, suggesting a possible adjustment to the separation of variables approach.
  • Clarifications are made regarding the assumptions about the boundary conditions and the behavior of the function ##f(r,t)## at the boundaries.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correctness of the boundary conditions or the mathematical steps involved in the solution. Multiple competing views remain regarding the interpretation of the PDE and the implications of the boundary conditions.

Contextual Notes

There are unresolved questions about the assumptions made regarding the boundary conditions and the notation used for derivatives. The discussion highlights the complexity of applying separation of variables in this context and the potential for misinterpretation of the problem setup.

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
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 ##?
 
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 ##?
 
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##.
 
Additional question then: Does ## f_r(r=0) ## imply ## f_r(r=0) ## for all ## t ##?
 
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?
 
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?
 
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   Reactions: Charles Link
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

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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 36 ·
2
Replies
36
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K