This question is sort of related to another one I had asked here
I am working on the following problem:
Suppose $\displaystyle \frac{\partial T}{\partial t} = \frac{\partial}{\partial x}\left(K(x) \frac{\partial T}{\partial x} \right)$, $0< x < L$
where $K(x)>0$ is a continuously differentiable ($C^{1}$) function,
$T(x=0,t)=A\,\,$ (where $A$ is a constant),
and we have a Newton's Law of Cooling condition at $x=L\,\,$: $\displaystyle \frac{\partial T}{\partial x} = -\alpha T$, with $\alpha > 0$, $\alpha$ constant.
Find the equilibrium temperature in terms of quadratures (i.e., integrals).
Evaluate when $\mathbf{K(x) = \kappa e^{-x}}$ with $\mathbf{\kappa > 0}$ constant.
So far, I have made an attempt at Part 1, but not Part 2 (I don't imagine it would be wise to attempt Part 2 until I have figured out Part 1).
This is what I have done so far:
- Since the equilibrium temperature does not change in time, this means that $\displaystyle \frac{\partial T}{\partial t}=0$, so our PDE becomes
$\,\,\,\,\,\,\,\,\,\displaystyle 0 = \frac{\partial }{\partial x}\left(K(x)\frac{\partial T}{\partial x} \right)$.
Applying the Product Rule for Derivatives to the RHS, we obtain:
$\displaystyle 0 = \frac{\partial K}{\partial x} \frac{\partial T}{\partial x} + K(x)\frac{\partial ^{2} T}{\partial x^{2}}$
$\displaystyle = K^{\prime}(x) \frac{\partial T}{\partial x} + K(x)\frac{\partial ^{2} T}{\partial x^{2}}$ (since $K$ is a function only of $x$).
Now, I attempted to perform integration by parts on this new equation as follows, when something very strange happens (Note that below, $\mathbf{C}$ is a constant of integration):
$\displaystyle C = \int K^{\prime}(x) \frac{\partial T}{\partial x} dx + \int K(x) \frac{\partial ^{2} T}{\partial x^{2}}dx$
$\displaystyle = \frac{\partial T}{\partial x}K(x) - \int K(x)\frac{\partial ^{2} T}{\partial x^{2}}dx + \int K(x)\frac{\partial ^{2} T}{\partial x^{2}}dx $
$\displaystyle = \frac{\partial T}{\partial x} K(x)$.
The two integrals with the second-order partials cancel each other out!
So, I'm just left with $C = \displaystyle \frac{\partial T}{\partial x} K(x)$!
Solving this for $\displaystyle \frac{\partial T}{\partial x}$ and integrating both sides, I obtain:
$\displaystyle T + D = \int \frac{C}{K(x)}dx \to$
$\displaystyle T = \int \frac{C}{K(x)}dx - D$, where $D$ is a constant of integration.
Now, before I go any further with this problem, I want to know if the equilibrium temperature I obtained in terms of integrals is correct. I assume that if so, I make the suggested substitution in Part 2 for $K$ as $\kappa e^{-x}$, $\kappa > 0$ constant, perform the integration, and apply the boundary conditions, and then I end up with what I'm supposed to end up with.
The only thing that's tripping me up is the fact that those two integrals canceled. It just seems weird to me, hence why I'm asking.