Solve a system of equations for functions
If I run the following code:
var('r')
f = function('f')(r)
g = function('g')(r)
eq1 = diff(f,r) + diff(g,r) == 6
eq2 = diff(f,r) - diff(g,r) == 4
solve([eq1,eq2],diff(f,r),diff(g,r))
I get:
TypeError: diff(f(r), r) is not a valid variable.
However, solving eq1 or eq2 independently does provide a solution:
sage: solve(eq1, diff(f,r))
[diff(f(r), r) == -diff(g(r), r) + 6]
sage: solve(eq2, diff(g,r))
[diff(g(r), r) == diff(f(r), r) - 4]
What could be wrong here? Could it be that in a system of equations 'Solve' only provides a solution if the unknowns are variables and not functions (or derivative of functions)?