# PDE raises NDSolve::ntdvdae, then kernel quits

In a related question, the SolveDelayed->True option seemed to solve the problem. SolveDelayed is not a valid option in M10 (at least not the Student Edition). Any other suggestions?

{λ = 1, μ = 0.2, δ = 0.08, η = 0.9, β = 0.8, n = 2};
A = SparseArray[{{i_, j_} /; i < j -> η, {i_, j_} /; i > j -> β, {i_, i_} -> 1}, {n, n}];
b[i_, x_] := λ x[[i]];
d[i_, x_] := (μ + δ A[[i]].x) x[[i]];
H[x_, y_] := Sum[b[i, x] (Exp[y[[i]]] - 1) + d[i, x] (Exp[-y[[i]]] - 1), {i, n}];

sol = NDSolve[{
0 == H[{x, x}, D[U[x, x], {{x, x}, 1}]],
U[0, x] == 0,
U[x, 0] == 0
}, U, {x, 0, 10}, {x, 0, 10}]

• According to a Wolfram Community post, SetDelayed is legal but deprecated. Indeed, the code runs for a while with this option included, even though it is red until the code runs. However, whether SetDelayed is True or False, the Kernel terminates. For True, Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >> message appears. For False, nothing appears. Note that derivatives in this PDE appear in exponentials. – bbgodfrey Feb 7 '15 at 13:26
• @bbgodfrey I think you meant SolveDelayed instead of SetDelayed. – Michael E2 Feb 7 '15 at 14:07

Apparently, the Kernel terminates, because it does not like x and x in this context. When I modify the code to

sol = NDSolveValue[{0 == H[{x1, x2}, D[U[x1, x2], {{x1, x2}, 1}]],
U[0, x2] == 0, U[x1, 0] == 0}, U, {x1, 0, 10}, {x2, 0, 10}]


it gives the same warning message,

NDSolveValue::ntdvdae: Cannot solve to find an explicit formula for the derivatives. NDSolve will try solving the system as differential-algebraic equations. >>


but the Kernel does not terminate. Instead, the code produces an InterpolatingFunction that is identically zero. Indeed, U = 0 satisfies H[{x1, x2}, {0, 0}] == 0 with homogeneous boundary conditions, so U = 0 is the correct answer.

Update

As pointed out by Michael E2 in a Comment below, Method -> {"EquationSimplification" -> "Residual"} eliminates the warning message.

• I remember this issue of indexed variables arising somewhere else, but I can't find the right search terms. – Michael E2 Feb 7 '15 at 14:07
• Why not point out Method -> {"EquationSimplification" -> "Residual"}, the solution suggested in the community post you linked to in your comment above? – Michael E2 Feb 7 '15 at 14:09
• @MichaelE2 Not sure whether your comment was meant for me, but I acted on it by trying it and then editing my answer. Thanks. – bbgodfrey Feb 7 '15 at 14:24
• Yes, the second comment was meant for you, and you're welcome! (+1 already.) The first was general. It would be nice to link the questions. – Michael E2 Feb 7 '15 at 14:34
• Back to the drawing board on my boundary conditions, I suppose ... never do get those right. – Ian Feb 7 '15 at 14:56