# What does the syntax C[x][y] mean?

I am examining an integrability condition, $$u_{3,122}=u_{3,123}.$$ Typing

DSolve[D[u3[x1,x2,x3],x1,x2,x2]==D[u3[x1,x2,x3],x1,x2,x3],u3,{x1,x2,x3}]


it into MMA gives the following output:

{{u3 -> Function[{x1, x2, x3},
C[x2, x3] + x1 C[x1][x3] + x1 C[x1][x2 + x3]]}}


I understand that the integration 'constants' C and C are functions of two variables, so the result C[x2, x3] is clear. But what does C[x1][x3] mean? Specifically, why is there a concatenation of argument brackets [x1][x3] instead of an argument?

• I'm adding the bugs tag because there should be three independent parameters. Aug 9, 2018 at 13:00

It looks like an error. For C[x][y] to make sense C[x] must represent a single-variable function (and C should represent a function that produces a function). However, in the solution returned by DSolve, C has to have a different meaning in the first term. Probably the second two parameters should be C and C. Another point of confusion is that in classical math, C[x][y] would automatically be uncurried to form C[x, y]. See also Curry.

We can see that the more general expression with three functions C, C, C is a solution:

D[u3[x1, x2, x3], x1, x2, x2] == D[u3[x1, x2, x3], x1, x2, x3] /.
{u3 -> Function[{x1, x2, x3},
C[x2, x3] + x1 C[x1][x3] + x1 C[x1][x2 + x3]]}
(*  True  *)


The uncurried form is also a solution:

D[u3[x1, x2, x3], x1, x2, x2] == D[u3[x1, x2, x3], x1, x2, x3] /.
{u3 -> Function[{x1, x2, x3},
C[x2, x3] + x1 C[x1, x3] + x1 C[x1, x2 + x3]]}
(*  True  *)


Speculation: Probably the parameter generator checks the heads for unique C[n] expressions, but the head of C[x1][x3] is C[x1] and doesn't match C. One can see that the order of creation with the following:

Trace[
DSolve[D[u3[x1, x2, x3], x1, x2, x2] ==
D[u3[x1, x2, x3], x1, x2, x3], u3, {x1, x2, x3}],
C[_][__],
TraceInternal -> True]


Remark: Note that DSolve gives an unexplainable error (without examining internals):

Last::nolast: {} has zero length and no last element.

• Just to compare. Maple 2018 answers $${\it u3} \left( {\it x1},{\it x2},{\it x3} \right) ={F_1} \left( {\it x3},{\it x2} \right) +{F_2} \left( {\it x3},{\it x1} \right) +{F_3} \left( {\it x1},{\it x3}+{\it x2} \right) .$$ Aug 9, 2018 at 14:06