TransWikia.com

Missing integration constants in solution to PDE

Mathematica Asked by Scott G on January 16, 2021

I am attempting to obtain the analytical solution (if possible) to the following:

$$a w^{(1,0)}(x,t)+b w^{(0,1)}(x,t)=p(x)+g w(x,t)$$
$$I.C.: w(x,0)=0 | B.C.: w(0,t)=z(t)$$

Clear["Global`*"]
a = v;
b = 1;
g = -[Lambda];
p = [Psi]*Cos[Pi*x];
ic = w[x, 0] == 0;
bc = w[0, t] == z[t];
pde = a*D[w[x, t], x] + b*D[w[x, t], t] == g*w[x, t] + p
DSolve[pde, w[x, t], {x, t}]

$$left{left{w(x,t)to frac{e^{-frac{lambda x}{v}} left(pi ^2 v^2 c_1left(frac{t v-x}{v}right)+lambda ^2 c_1left(frac{t v-x}{v}right)+pi v psi sin (pi x) e^{frac{lambda x}{v}}+lambda psi cos (pi x) e^{frac{lambda x}{v}}right)}{lambda ^2+pi ^2 v^2}right}right}$$

However, the solution returned only has 1 integration constant, c_1, rather than the 2 I expected (i.e., an initial condition and a boundary condition). Thus, when I attempt the next step to apply the conditions I can only apply one, leading to an erroneous/incomplete solution.

Any guidance would be greatly appreciated. Using v11.2.

Update

Apparently c_1 is really a function and not a constant. In that case I am still left wondering how to proceed. There is a soluction when solving for IC OR BC but not both. Ideas/tricks on how to proceed?

DSolve[{pde, ic}, w[x, t], {x, t}]

$$left{left{w(x,t)to frac{psi e^{-frac{lambda x}{v}} left(-pi v e^{frac{lambda (x-t v)}{v}} sin (pi (x-t v))-lambda e^{frac{lambda (x-t v)}{v}} cos (pi (x-t v))+pi v sin (pi x) e^{frac{lambda x}{v}}+lambda cos (pi x) e^{frac{lambda x}{v}}right)}{lambda ^2+pi ^2 v^2}right}right}$$

DSolve[{pde, bc}, w[x, t], {x, t}]

$$left{left{w(x,t)to frac{e^{-frac{lambda x}{v}} left(-lambda psi +pi ^2 v^2 zleft(frac{t v-x}{v}right)+lambda ^2 zleft(frac{t v-x}{v}right)+pi v psi sin (pi x) e^{frac{lambda x}{v}}+lambda psi cos (pi x) e^{frac{lambda x}{v}}right)}{lambda ^2+pi ^2 v^2}right}right}$$

DSolve[{pde, ic, bc}, w[x, t], {x, t}]

$$text{DSolve}left[left{v w^{(1,0)}(x,t)+w^{(0,1)}(x,t)=psi cos (pi x)-lambda w(x,t),w(x,0)=0,w(0,t)=z(t)right},w(x,t),{x,t}right]$$

One Answer

While Mathematica does not seem to be able to solve the problem for a general unknown boundary condition $w(0,t) = z(t)$, it can generally solve it if $z(t)$ is replaced by a known function such as $sin(t)$:

Clear["Global`*"]
a = v;
b = 1;
g = -[Lambda];
p = [Psi]*Cos[Pi*x];
ic = w[x, 0] == 0;
bc = w[0, t] == Sin[t];
pde = a*D[w[x, t], x] + b*D[w[x, t], t] == g*w[x, t] + p
DSolve[{pde, bc, ic}, w[x, t], {x, t}]

Replacing $z(t)$ with a polynomial also results in a solution fairly quickly. I also tried $z(t) = ln(1+t)$, which took longer but did eventually return a solution as well.

Correct answer by Michael Seifert on January 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP