If I run the following code:
var('r')
f = function('f')(r)
g = function('g')(r)
eq1 = diff(f,r)+2*r
eq2 = diff(g,r) + diff(f,r) + 2*r
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? In a system of equations 'Solve' only provides a solution if the unknowns are variables and not functions (or derivative of functions)?