# integration constants for coupled differential equations

I am solving the following differential equation and boundary conditions

dsol = Flatten[DSolve[{
0 == s''[x] - c n'[x] , 0 == n''[x] - c s'[x],
n'[L] - c s[L] == 0, s'[L] - c n[L] == 0
}, {s[x], n[x]}, x]] // FullSimplify


which yields:

 {n[x] -> C[1] Cosh[c x] + (C[2] Sinh[c x])/c,
s[x] -> (C[2] Cosh[c x])/c + C[1] Sinh[c x]}


My question is: are the C[1] and C[2] integration constants identical for the two solutions? Or should I treat them as 4 separate quantities to be determined?

• What happens if you try substituting these solutions you got into the original DE? Note the result of that, and repeat the experiment where the C[1] and C[2] of either s or n have been replaced with C[3] and C[4]. Jul 30 '17 at 2:51
• Yep, that was easy. C[1] = C[3] and C[2] = C[4] Jul 30 '17 at 2:58
• You can answer your own question now, if you want. Jul 30 '17 at 2:59

Nope, the constants are the same.

Originally I thought that Mathematica might treat the solutions as solutions to two different differential equations and then start its numbering of integration constants back at C[1].

However it's easy (HT @J.M.) to show that's not the case. Leave the first solutions as is but change the constants of the second solution to C[3] and C[4]. Now put back in the original differential equations. You will see that they are only satisfied if C[1] = C[3] and C[2] = C[4].