# How fragile is DEigensystem?

I'm having a lot of trouble using DEigensystem on my Mac running V11.0.0. When I enter exactly the text in the example in the help file, it works properly:

DEigensystem[{D[u[t, x], t] == Laplacian[u[t, x], {x}],
DirichletCondition[u[t, x] == 0, True]}, u[t, x], t, {x, 0, π}, 4]

(*{{-1, -4, -9, -16}, {E^-t Sin[x], E^(-4 t) Sin[2 x],
E^(-9 t) Sin[3 x], E^(-16 t) Sin[4 x]}}*)


However, when I make almost any change to that, it simply refuses to process it and returns the input. The examples below all fail. The first adds an initial value, the second adds a heat constant to the Laplacian term, and the third simply reverses the order of the equality in the DE:

DEigensystem[{D[u[t, x], t] == Laplacian[u[t, x], {x}],
DirichletCondition[u[t, x] == 0, True], u[0, x] = x},
u[t, x], t, {x, 0, π}, 4]

DEigensystem[{D[u[t, x], t] == k Laplacian[u[t, x], {x}],
DirichletCondition[u[t, x] == 0, True]},
u[t, x], t, {x, 0, π}, 4]

DEigensystem[{Laplacian[u[t, x], {x}] == D[u[t, x], t],
DirichletCondition[u[t, x] == 0, True]},
u[t, x], t, {x, 0, π}, 4]


Even simply reversing the order of the formal parameters to the function u makes it fail:

DEigensystem[{D[u[x,t], t] == Laplacian[u[x,t], {x}],
DirichletCondition[u[x,t] == 0, True]}, u[x,t], {x, 0, π}, t, 4]


I can't find a reasonable set of restrictions documented anywhere. It's disappointing that this doesn't seem to work except in the simplest case. Am I missing something?

I don't know much about this kind solver for differential equations, but even I can find some problems with most of your variations.

This requires a numerical solution. It also requires correcting u[0, x] = x to u[0, x] == x. Therefore, I evaluated

N[DEigensystem[
{D[u[t, x], t] == Laplacian[u[t, x], {x}],
u[0, x] == x,
DirichletCondition[u[t, x] == 0, True]},
u[t, x], t, {x, 0, π}, 4]]


as the documentation instructed me. I got the following message

NDEigensystem::tvic: t cannot be used as the temporal independent variable because the conditions {u[0, x] == x, u[0, x] == 0} for that dimension do not constitute sufficient initial conditions given at only one value of t.

It appears that the initial condition you introduced is invalid.

Adding the initial condition u[t, 0] == 273 worked fine.

2. Adding a heat constant to the Laplacian term.

This will work for any constant satisfying NumericQ, but not for a symbolic constant.

DEigensystem[
{D[u[x, t], t] == π Laplacian[u[x, t], {x}],
DirichletCondition[u[x, t] == 0, True]},
u[x, t], t, {x, 0, π}, 4]


{{-π, -4 π, -9 π, -16 π}, {E^(-π t)Sin[x], E^(-4 π t)Sin[2 x], E^(-9 π t)Sin[3 x], E^(-16 π t) Sin[4 x]}}

3. Simply reversing the order of the formal parameters

There are two ways to change the order of the formal parameters.

DEigensystem[
{D[u[t, x], t] == Laplacian[u[t, x], {x}],
DirichletCondition[u[t, x] == 0, True]},
u[t, x], t, {x, 0, π}, 4]


and

DEigensystem[
{D[u[x, t], x] == Laplacian[u[x, t], {t}],
DirichletCondition[u[x, t] == 0, True]},
u[x, t], x, {t, 0, π}, 4]


Both of these work, but neither is what you wrote.

4. Reversing the order of the equality.

You may have a valid gripe here. It is surprising that DEigensystem is sensitive to which side of the equation the Laplacian appears, but it appears to be so.

• For (1), fine, I guess that's right. For (2), it's nice to know that it works that way, but why? Surely a transcendental constant in an otherwise symbolic computation is equivalent to a variable, so why should it fail if a variable is provided? (Besides, I tried EulerGamma, which is Numeric, and it failed just like k did). For (3), there's no indication in the definition of the Laplacian that the formal parameter order is important, and I don't see why what I've done shouldn't be valid. – rogerl Dec 13 '16 at 1:07
• @rogerl. The order of the formal parameters isn't important. Consistency in changing them is. – m_goldberg Dec 13 '16 at 1:19
• So I'm not clear where I was inconsistent. All I did was reverse the order of x and t in the formal parameter list. x still represents distance, and t time. – rogerl Dec 13 '16 at 1:21
• @rogerl. No matter what order is specified for the formal variables, the order of the arguments can not be changed. It is clear that the 3rd arg specifies a variable and the 4th specifies a domain. You can't change that, but that is exactly what you tried to do. – m_goldberg Dec 13 '16 at 2:48
• @rogerl. DEigensystem is a new function. It first appeared in V10.3. New functions often have limitations that are removed in later releases. If the 2nd issue is important to you, bring it to attention Wolfram tech support. The more they hear about it, the more likely it is that it will be addressed. – m_goldberg Dec 13 '16 at 3:00