3
$\begingroup$

I'm trying to solve the pde $u_{t}= 2u_{xx}-2u_{x}+u$, $0

I tried the change of variables $u(x,t)= e^{x-t}v(x,t)$, but when I do so, only the linear term $u$ disappears and my b.c.'s and I.c.'s have exponential terms in the denominator.

I'm thinking this probably isn't the best change of variables to pick. Any hints on one that could be better at achieving my goals?

  • 0
    Have you tried separation of variables? It might be a little tedious compared to the usual case (without the $u_x$ and the $u$ term), but it should still get the job done.2017-01-11
  • 0
    @Tom I'm working on that now with the guy who answered below, but now I'm at a standstill. Would you be willing to help me figure out where to go from there?2017-01-11
  • 0
    Sure. You've solved the differential equation for $T(t)$, right? That's just $Ae^{-ct}$. What are you currently struggling with for $X(x)$? EDIT: I'll write something as an answer as a supplement to what caverac said.2017-01-11
  • 0
    @Tom I thought, based on what caverac said I should solve for $X(x)$ first.2017-01-11
  • 0
    @Tom are you saying I should sove for $T(t)$ first, get $Ae^{-ct}$, then use the $c$ that caverac told me how to find (which I still don't entirely understand by the way), and then that's my solution to both parts? Ack I'm so confused. It would be good to write something to supplement it.2017-01-11
  • 0
    @Tom it would be very good if you wrote something as an answer to supplement what caverac did, b/c I am still extremely confused and bewildered.2017-01-11

2 Answers 2

3

Continuing on from caverac's answer, I'm going to approach this slightly differently - I'll call the separation constant $-c^2$, which will make things easier in the long run. It's no restriction, because $c$ could be complex (it will turn out that it isn't).

So, we have two ordinary differential equations to solve.

\begin{align} T'(t) + c^2T(t) &= 0\\ 2X''(x) - 2X'(x) + (1+k^2)X(x) &= 0 \end{align}

The first one is easily solved and we have

$$T(t) = Ae^{-c^2t}$$

Looking at the second equation we recognise it as a linear equation. The characteristic equation is

$$2\lambda^2-2\lambda+1+c^2=0 \Leftrightarrow \lambda^2-\lambda+\frac{1+c^2}{2}=0$$

Its roots are given by

$$\lambda_{1,2} = \frac{1\pm\sqrt{-1-2c^2}}{2}$$

(which could be complex or real, as we don't know if $c$ is real a priori) and thus we have

$$X(x) = Be^{\lambda_1x}+Ce^{\lambda_2x}$$

Now recall that our assumption was that $u(x,t) = X(x)T(t)$. Letting $a:=AB, b:=AC$, we thus have

$$u(x,t) = e^{-c^2t}\left(ae^{\lambda_1x}+be^{\lambda_2x}\right)$$

We now plug in the boundary conditions and the initial condition. First, we have $u(0,t) = 0$, and thus

$$0=e^{-c^2t}\left(a+b\right)$$

This gives us one equation: $a=-b$. Using this information, we rewrite the solution slightly:

\begin{align} u(x,t) &= e^{-c^2t}\left(ae^{\lambda_1x}+be^{\lambda_2x}\right)\\ &=e^{-c^2t+\frac{x}{2}}\left(ae^{\frac{\sqrt{-1-2c^2}}{2}x}-ae^{-\frac{\sqrt{-1-2c^2}}{2}x}\right)\\ &=2ae^{-c^2t+\frac{x}{2}}\sinh\left(\frac{\sqrt{-1-2c^2}}{2}x\right) \end{align}

We now use the second boundary condition, that $u(1,t)=0$.

$$0=2ae^{-c^t+\frac{x}{2}}\sinh\left(\frac{\sqrt{-1-2c^2}}{2}\right)$$

If the argument of the $\sinh$-function is real, then this is only possible for either that argument being zero or $a=0$, both which yield the trivial solution $u(x,t)=0$. However, if the argument of the $\sinh$-function is complex, then it becomes (apart from some factor) a $\sin$-function. Thus, we assume that $c\in\mathbb{R}$ (as this leads to the argument of the $\sinh$-function becoming complex) and we can rewrite the solution as follows:

$$u(x,t) = 2ae^{-c^2t+\frac{x}{2}}\sin\left(\frac{\sqrt{1+2c^2}}{2}x\right)$$

For this to be equal to $0$ for $x=1$, the following must hold:

$$\frac{\sqrt{1+2c^2}}{2}=n\pi$$

for some integer $n\in\mathbb{N}$.

This implies that

$$c=\sqrt{\frac{4n^2\pi^2-1}{2}}$$

This, however is a solution for any integer $n$ - thus, we write the general solution as a Fourier Sine series (where we absorb the factor $2$ into our arbitrary constant $a$):

$$u(x,t) = e^{\frac{x}{2}}\sum_{n=1}^\infty a_ne^{-\frac{4n^2\pi^2-1}{2}t}\sin(n\pi x)$$

Now, we must determine the coefficients $a_n$, and then we are done. To do this, use the initial condition that $u(x,0)=1$, which implies

$$e^{-\frac{x}{2}}=\sum_{n=1}^\infty a_n\sin(n\pi x)$$

Thus, $a_n$ are simply the Fourier coefficients of $e^{-\frac{x}{2}}$, which can be easily calculated by the relation

\begin{align} a_n &= 2\int_0^1 e^{-\frac{x}{2}}\sin(n\pi x)dx\\ &=2\Im\left[\int_0^1e^{\left(-\frac{1}{2}+in\pi\right)x}dx\right]\\ &=4\Im\left[\frac{e^{-\frac{1}{2}+in\pi}-1}{-1+2in\pi}\right]\\ &=4\Im\left[\frac{\left(e^{-\frac{1}{2}+in\pi}-1\right)(-1-2in\pi)}{1+4n^2\pi^2}\right]\\ &=4\Im\left[\frac{1+2in\pi-e^{-\frac{1}{2}+in\pi}-2in\pi e^{-\frac{1}{2}+in\pi}}{1+4n^2\pi^2}\right]\\ &=4\Im\left[\frac{1+2in\pi-e^{-\frac{1}{2}}\left(\cos(n\pi)+i\sin(n\pi)\right)-2in\pi e^{-\frac{1}{2}}\left(\cos(n\pi)+i\sin(n\pi)\right)}{1+4n^2\pi^2}\right]\\ &=4\frac{2n\pi-\frac{\sin(n\pi)}{\sqrt{e}}-\frac{2n\pi\cos(n\pi)}{\sqrt{e}}}{1+4n^2\pi^2}\\ &=\frac{8n\pi}{1+4n^2\pi^2}\left(1-\frac{(-1)^n}{\sqrt{e}}\right) \end{align}

Plugging this in, we have the final solution

$$u(x,t) = e^{\frac{x}{2}}\sum_{n=1}^\infty \frac{8n\pi}{1+4n^2\pi^2}\left(1-\frac{(-1)^n}{\sqrt{e}}\right)e^{-\frac{4n^2\pi^2-1}{2}t}\sin(n\pi x)$$

  • 0
    I just noticed that calling caverac's $c$ $c^2$ in my post didn't actually make things simpler, but oh well. It didn't make them any more complicated either, really. Sorry for the additional confusion, though.2017-01-11
  • 0
    thank you! This helped a lot! I'm having trouble with this one too: http://math.stackexchange.com/questions/2094047/need-help-with-change-of-variables-in-very-strange-heat-equation-problem I'm not sure whether it's actually an eigenvalue problem or what? This one guy who posted an answer says it essentially boils down to a one-dimensional problem, but I have no idea what that means in terms of eigenvalues and eigenfunctions. If you could take a look, I'd appreciate it.2017-01-12
  • 0
    also I noticed that I don't think you solved for $\lambda$ correctly. In your equation $2 \lambda ^{2} - 2\lambda + (1+c^{2}) = 0$, if the quadratic formula is $\displaystyle \lambda = -b \pm \frac{\sqrt{b^{2} - 4ac}}{2a}$, and if $a = 2$, $b = -2$, $c = 1+c^{2}$, then it should be $\displaystyle \lambda = 2 \pm \frac{\sqrt{(-2)^2-4(2)(1+c^2)}}{4} = 2 \pm \frac{\sqrt{4-8(1+c^2)}}{4} = 2 \pm \frac{\sqrt{4}\sqrt{1-2(1+c^2)}}{4} = 2 \pm \frac{2\sqrt{1-2(1+c^2)}}{4} = \frac{1\pm \sqrt{1-2(1+c^2)}}{2}=1 \pm \frac{\sqrt{-1-2c^2}}{2}$, which WILL be complex.2017-01-12
  • 0
    also, I think if the argument of the $\sinh$ function is zero, the whole thing would turn out to be zero, as well. So, I don't see why you couldn't have $c=1$ as well.2017-01-12
  • 0
    Yeah, that's possible that a computational error snuck in there somewhere, I'll have to go over it when I have a little more time. You're right about the argument of the $\sinh$ function being zero would be possible as well. However, this makes it impossible to fulfil the condition that $u(x,0)=1$ because then you don't get infinitely many possible solutions that you could use a series to construct their coefficients in the way that you need.2017-01-12
  • 0
    I've corrected the computational error regarding $\lambda$ and, just for completeness, calculated the final integral. Everything should be correct now.2017-01-12
  • 0
    thanks! I was close, but it looks like I was off a little bit, too. Oh well.2017-01-12
1

Call $u(x,t) = X(x)T(t)$ and replace it in your PDE, you should arrive to

$$ \frac{1}{T(t)}\frac{{\rm d}T(t)}{{\rm d}t} = \frac{2}{X(x)}\frac{{\rm d}^2X(x)}{{\rm d}x^2} - \frac{2}{X(x)}\frac{{\rm d}X(x)}{{\rm d}x} + 1 $$

So you have a function of $x$ in one side, and a function of $t$ on the other side of the equation, this is only possible if both functions are a constant, say $c$. Can you take it from there?

  • 0
    it's an eigenvalue problem, but no, b/c I don't know what to do with the $\frac{d^{2}X(x)}{X(x)}$ on the RHS. I need to be able to solve the equation in $x$ in order to find the eigenvalues but I don't see how to do that.2017-01-11
  • 0
    how would I go about dealing with the RHS once I've made it, say equal to some constant $\mu$?2017-01-11
  • 0
    I've got $\displaystyle 2X^{\prime\prime}(x) - 2X^{\prime}(x) + (1-\mu)X = 0$ Now what?2017-01-11
  • 0
    @JessyCat To solve the equation $$\frac{2}{X(x)}\frac{{\rm d}^2X(x)}{{\rm d}x^2} - \frac{2}{X(x)}\frac{{\rm d}X(x)}{{\rm d}x} + 1= c$$ you can assume the solutions to be of the form $X(x)\sim e^{\lambda x} $, replace it and from there you will find $\lambda = \lambda(c)$ and the possible values that $c$ can take2017-01-11
  • 0
    I did it your way and I got that $\frac{2}{e^{\lambda x}}\cdot \lambda^{2} e^{\lambda x} - \frac{2}{e^{\lambda x}} \cdot \lambda \cdot e^{\lambda x} + 1 = c$, which becomes $2\lambda^{2}-2\lambda + 1 = c$. Then, do I solve for $\lambda$?2017-01-11
  • 0
    @JessyCat yes you do! Then with the solutions you get you try your boundary conditions and see which values of $c$ are possible2017-01-11
  • 0
    so then, you have if $X(x) = e^{\lambda x}$, that $X(x) = e^{\left(\frac{1}{2} \pm \frac{1}{2}i\right)x} = e^{\frac{1}{2}x} e^{\pm \frac{i}{2}x}$?2017-01-11
  • 0
    when I did Euler's formula and tried to plug in the b.c.'s $X(0) = X(1) = 0$, it didn't work for either $e^{-\frac{i}{2}x}$ or for $e^{\frac{i}{2}x}$ b/c we ;have $X(x) = e^{1/2 x}\left[ \cos(x/2) - i \sin(x/2) \right]$ and $X(x) = e^{1/2x} \left[ \cos(x/2) + i \sin(x/2)\right]$ unless I did something wrong...2017-01-11
  • 0
    of course it wouldn't work for exponentials. They're never zero. So, what did you mean by "try your boundary conditions" then?2017-01-11
  • 0
    I'm so confused. I thouight you meant solve for $\lambda$ and plug them into the B.C.s. I realize now I didn't understand what you were saying. You can't plug $\lambda$s in for $x$'s. So, mechanically, couold you explain what it is exactly I need to do?2017-01-11
  • 0
    @JessyCat You forgot to include $c$ in your solution. In general you have $2\lambda = 1 \pm \sqrt{2c - 1}$. From here you can see that if you pick $c>1/2 $ the solution will never vanish at the boundaries, the only other option is $c < 1/2$. I will go offline now, but later tonight I'd be happy to help you!2017-01-11
  • 0
    but the solution to what? I'll try to figure this out. But I need to be finished by midnight EST.2017-01-11
  • 0
    and from there, how $c$ or $\lambda$ relates to the eigenvalues and what the eigenfunctions should be...2017-01-11
  • 0
    @JessyCat Glad to hear you solved the problem already. Do you want to tell me where the problem is with the other post? I see two solutions that seem pretty reasonable2017-01-12
  • 0
    no I'm actually okay with the first solution there. That solution wasn't there when I posted the link above. Although, if you have anything to say about http://math.stackexchange.com/questions/2094252/applying-difficult-initial-conditions-to-general-form-of-a-solution-to-get-bound ir's very much related to what we did here, except the initial conditions are frightening.2017-01-12
  • 0
    if you get a chance to take a look, I'd really appreciate. I kind of feel bad that I didn't get to award your answer here. :(2017-01-12
  • 0
    @JessyunBourne No worries, will have a look2017-01-12