How to get a converging solution for a second order PDE?

In summary: I haven't done it, but I did it numerically and it does indeed converge. I suspect you'll get a similar result as above after substituting the boundary condition in, but I haven't worked through it.In summary, the conversation discusses a problem of solving a second order partial differential equation with given constants and boundary conditions. The solution involves finding a Fourier sine series and expanding a term in a Fourier series. The conversation also includes a comparison of two solutions, one of which is found to be incorrect due to an error in the denominator of a term. The correct solution is found to satisfy the boundary conditions and converge to a value.
  • #1
enea19
3
1
I have been struggling with a problem for a long time. I need to solve the second order partial differential equation
$$\frac{1}{G_{zx}}\frac{\partial ^2\phi (x,y)}{\partial^2 y}+\frac{1}{G_{zy}}\frac{\partial ^2\phi (x,y)}{\partial^2 x}=-2 \theta$$
where ##G_{zy}##, ##G_{zx}##, ##\theta##, ##a##, and ##b## are constants and with BCs ##\phi (0,y)=\phi (a,y)=0## and ##\phi (x,-b)=\phi (x,b)=0##. The solution that I have sets ##\phi (x,y)=\sum _{k=1,3,5\text{...}}^{\infty } Y(y) \sin \left(\frac{\pi k}{a}x\right)## and expands ##-2 \theta## in a Fourier sine series in the interval between 0 and a so we end up with a second order differential equation,
$$\frac{Y''(y)}{G_{zx}}-\frac{\pi ^2 k^2 Y(y)}{a^2 G_{zy}}=-\frac{8 \theta }{\pi k}$$
I tried several times to solve it by hand but end up making mistakes. Therefore I resorted to Mathematica and it gives me the following solution,
$$\phi_{mine}(x,y)=-\sum_{k=1,3,5,...}^{\infty}\frac{8 a^2 G_{zy} \theta \left(\text{sech}\left(\frac{\pi b k}{2 a} \frac{\sqrt{G_{zx}}}{\sqrt{G_{zy}}} \right) \cosh \left(\frac{\pi k y}{a} \frac{\sqrt{G_{zx}}}{\sqrt{G_{zy}}}\right)-1\right)}{\pi ^3 k^3}\sin \left(\frac{\pi k x}{a}\right)$$

This is almost exactly what is written in the solution that I have, which is
$$\phi_{sol}(x,y)=\frac{8}{\pi^3} G_{zy} a^2 \sum_{k=1,3,5,...}^{\infty}\frac{(-1)^{(k-1)/2}}{k^3}\left( 1-\frac{\cosh \left(\frac{\pi k \mu }{a}y\right)}{\cosh \left(\frac{b \pi k \mu}{2 a}\right)} \right)\cos \left(\frac{\pi k}{a}x\right)$$
where ##\mu=\sqrt{\frac{G_{zx}}{G_{zy}}}##.

##\phi_{sol}(x,y)## is missing ##\theta## but I suspect that it might be a typo. I know that ##\phi_{mine}(x,y)## is wrong because the next step in the process involves working out a constant ##\beta## where
$$\beta=\frac{2 \int_{-b/2}^{b/2} \left(\int_0^a \phi (x,y) \, dx\right) \, dy}{G_{zx} a b^3}$$
I get that ##\phi_{sol}(x,y)## converges to a value while ##\phi_{mine}(x,y)## goes to infinity. Therefore I'm doing something wrong but I'm not sure what. I've been trying to figure out the difference between my answer and the solution and all I can find is that somehow
$$\sin \left(\frac{\pi k x}{a}\right)=\cos\left(\frac{\pi k x}{a}\right) (-1)^{(k-1)/2}$$
for ##k=1,3,5,...## Is it possible to change ##\sin \left(\frac{\pi k x}{a}\right)## into ##\cos\left(\frac{\pi k x}{a}\right) (-1)^{(k-1)/2}## when only odd values of ##k## are used? I've never seen this and when I plot them they give different curves so they don't seem to be equivalent.
 
Physics news on Phys.org
  • #2
enea19 said:
I have been struggling with a problem for a long time. I need to solve the second order partial differential equation
$$\frac{1}{G_{zx}}\frac{\partial ^2\phi (x,y)}{\partial^2 y}+\frac{1}{G_{zy}}\frac{\partial ^2\phi (x,y)}{\partial^2 x}=-2 \theta$$
where ##G_{zy}##, ##G_{zx}##, ##\theta##, ##a##, and ##b## are constants and with BCs ##\phi (0,y)=\phi (a,y)=0## and ##\phi (x,-b)=\phi (x,b)=0##. The solution that I have sets ##\phi (x,y)=\sum _{k=1,3,5\text{...}}^{\infty } Y(y) \sin \left(\frac{\pi k}{a}x\right)## and expands ##-2 \theta## in a Fourier sine series in the interval between 0 and a so we end up with a second order differential equation,
$$\frac{Y''(y)}{G_{zx}}-\frac{\pi ^2 k^2 Y(y)}{a^2 G_{zy}}=-\frac{8 \theta }{\pi k}$$
I tried several times to solve it by hand but end up making mistakes. Therefore I resorted to Mathematica and it gives me the following solution,
$$\phi_{mine}(x,y)=-\sum_{k=1,3,5,...}^{\infty}\frac{8 a^2 G_{zy} \theta \left(\text{sech}\left(\frac{\pi b k}{2 a} \frac{\sqrt{G_{zx}}}{\sqrt{G_{zy}}} \right) \cosh \left(\frac{\pi k y}{a} \frac{\sqrt{G_{zx}}}{\sqrt{G_{zy}}}\right)-1\right)}{\pi ^3 k^3}\sin \left(\frac{\pi k x}{a}\right)$$

I don't know where the 2 in the denominator of the sech term comes from; it results in this solution not satisfying the boundary condition on [itex]y = \pm b[/itex]. (Unless the boundary is actually at [itex]y = \pm b/2[/itex], in which case it is correct.)

Setting [itex]\phi = \sum_{n=1}^\infty Y_n(y) \sin(n\pi x/a)[/itex] I find that [itex]Y_n = 0[/itex] for even [itex]n[/itex] and [tex]
Y_n'' - \frac{n^2 \pi^2 G_{zx}}{a^2 G_{zy}}Y_n = -\frac{8 \theta G_{zx}}{n\pi}[/tex] for odd [itex]n[/itex]. So far we agree.

The solution of this which satisfies the boundary condition on [itex]y = \pm b[/itex] is [tex]
Y_n = \frac{8\theta a^2 G_{zy}}{n^3 \pi^3} \left(1 - \cosh\left( \frac{n\pi G_{zx}^{1/2}}{aG_{zy}^{1/2}} y \right)\mathrm{sech}\left(\frac{n\pi G_{zx}^{1/2}}{aG_{zy}^{1/2}} b\right)\right)
[/tex] which is basically [itex]\phi_{mine}[/itex] but without the erroneous 2 in the denominator of the sech factor.

This is almost exactly what is written in the solution that I have, which is
$$\phi_{sol}(x,y)=\frac{8}{\pi^3} G_{zy} a^2 \sum_{k=1,3,5,...}^{\infty}\frac{(-1)^{(k-1)/2}}{k^3}\left( 1-\frac{\cosh \left(\frac{\pi k \mu }{a}y\right)}{\cosh \left(\frac{b \pi k \mu}{2 a}\right)} \right)\cos \left(\frac{\pi k}{a}x\right)$$
where ##\mu=\sqrt{\frac{G_{zx}}{G_{zy}}}##.

[itex]\phi_{sol}[/itex] has the same issue: It doesn't satisfy the boundary condition on [itex]y = \pm b[/itex] because of the 2 in the denominator of the [itex]\cosh \left(\frac{b \pi k \mu}{2 a}\right)[/itex] expression. But it does vanish at [itex]y = \pm b/2[/itex].

##\phi_{sol}(x,y)## is missing ##\theta## but I suspect that it might be a typo. I know that ##\phi_{mine}(x,y)## is wrong because the next step in the process involves working out a constant ##\beta## where
$$\beta=\frac{2 \int_{-b/2}^{b/2} \left(\int_0^a \phi (x,y) \, dx\right) \, dy}{G_{zx} a b^3}$$

The domain in [itex]y[/itex] suggests that the boundary is indeed at [itex]y = \pm \frac12 b[/itex] rather than [itex]y = \pm b[/itex].

I get that ##\phi_{sol}(x,y)## converges to a value while ##\phi_{mine}(x,y)## goes to infinity. Therefore I'm doing something wrong but I'm not sure what.

If you apply the boundary condition at [itex]y = \pm b[/itex] and integrate from [itex]-b[/itex] to [itex]b[/itex] then you end up summing terms of the form [itex](b - \tanh(Cnb)/(Cn))/n^4[/itex] for some constant [itex]C[/itex], which will converge because you can bound it above by [itex](b + 1/(Cn))/n^4[/itex] and below by [itex](b - 1/(Cn))/n^4[/itex], both of which converge.

If you apply the boundary condition at [itex]y = \pm b/2[/itex] and integrate from [itex]-b/2[/itex] to [itex]b/2[/itex], then you'll get the same thing for a different value of [itex]C[/itex].

If you apply the boundary condition at [itex]y = b[/itex] and integrate from [itex]-b/2[/itex] to [itex]b/2[/itex], then you get something like [tex]
\frac{1}{n^4}\left(b - \frac{1}{Cn}\sinh(\tfrac12 Cnb)\mathrm{sech}(Cnb)\right)[/tex] which should converge because the exponential terms are asymptotic to [itex]e^{-Cnb/2}[/itex]. If you do it the other way around the exponential terms are asymptotic to [itex]e^{Cnb/2}[/itex], and the sum won't converge.

I've been trying to figure out the difference between my answer and the solution and all I can find is that somehow
$$\sin \left(\frac{\pi k x}{a}\right)=\cos\left(\frac{\pi k x}{a}\right) (-1)^{(k-1)/2}$$
for ##k=1,3,5,...## Is it possible to change ##\sin \left(\frac{\pi k x}{a}\right)## into ##\cos\left(\frac{\pi k x}{a}\right) (-1)^{(k-1)/2}## when only odd values of ##k## are used?

That would mean that [itex]\tan(k \pi x/a) = (-1)^{(k-1)/2}[/itex] for every [itex]x[/itex], which is not the case.

I've never seen this and when I plot them they give different curves so they don't seem to be equivalent.

Expanding in cosines rather than sines suggests that the boundary condition is that [itex]\partial \phi/\partial x[/itex] should vanish at [itex]x = 0, a[/itex] rather than [itex]\phi[/itex]. That of course results in a different series expansion for [itex]-2\theta[/itex].
 
  • #3
Thanks for your answer! Oh my, I realized that I wrote the wrong limits! I'm really sorry, you are right the limits for ##y## are indeed ##\pm b/2##. Apologies for the confusion and thanks again for the answer.

If it's not too much bother, where do you think the ##\cos\left(\frac{\pi k x}{a}\right) (-1)^{(k-1)/2}## comes from?
 
Last edited:
  • #4
enea19 said:
Thanks for your answer! Oh my, I realized that I wrote the wrong limits! I'm really sorry, you are right the limits for ##y## are indeed ##\pm b/2##. Apologies for the confusion and thanks again for the answer.

If it's not too much bother, where do you think the ##\cos\left(\frac{\pi k x}{a}\right) (-1)^{(k-1)/2}## comes from?

I have no idea. Expanding as a series in cosines makes no sense, since they don't satisfy the given boundary conditions.
 
Last edited:

FAQ: How to get a converging solution for a second order PDE?

What is a second order PDE?

A second order partial differential equation (PDE) is a mathematical equation that involves partial derivatives of a function with respect to two or more independent variables. It is a type of differential equation that is commonly used to model physical phenomena in science and engineering.

Why is it important to get a converging solution for a second order PDE?

A converging solution for a second order PDE is important because it ensures that the solution is stable and accurate. Without a converging solution, the results may be unreliable and not reflect the true behavior of the system being modeled.

What methods can be used to obtain a converging solution for a second order PDE?

There are several methods that can be used to obtain a converging solution for a second order PDE, including finite difference methods, finite element methods, and spectral methods. Each method has its own advantages and disadvantages, and the choice of method depends on the specific problem being solved.

How can boundary conditions affect the convergence of a solution for a second order PDE?

Boundary conditions play a crucial role in obtaining a converging solution for a second order PDE. They define the behavior of the solution at the boundaries of the domain and can greatly impact the accuracy and stability of the solution. It is important to carefully choose appropriate boundary conditions for a given problem.

Are there any common challenges in obtaining a converging solution for a second order PDE?

Yes, there are several common challenges that can arise when trying to obtain a converging solution for a second order PDE. These include instabilities, convergence issues, and difficulties in choosing appropriate numerical methods and parameters. It is important to carefully analyze and troubleshoot these challenges in order to obtain an accurate and reliable solution.

Similar threads

Back
Top