Question: Wrong identity solve


I have two terms r and g as:

r := x*(diff(theta(t), t))^2+y*(diff(varphi(t), t))^2;

g := (4*(f+T))*(diff(theta(t), t))^2+u*(diff(varphi(t), t))^2;

Now I want to equate these as r=g and find x and y

As we see, x and y must be 4*(f+T), and u, respectively.

I used "solve" and also "solve(identity....)" and "isolate" and also "eliminate" but all of them failed and I face another solution in which x has y !!!! for example, see the result for "solve(r = g, {x, y})"

However, I can use "coeff" and get the result, but in this case, indeed I write the solution, not maple, while I have this expectation that maple does these and give me the result:

coeff(r,(diff(theta(t), t))^2)=coeff(g,(diff(theta(t), t))^2);

coeff(r,(diff(varphi(t), t))^2)=coeff(g,(diff(varphi(t), t))^2);

This example is a simple one; in complicated cases, I must write more codes, for example, perhaps I must use isolate as well.... For this reason, I want to find a short and applicable code.

If it is possible, please help me to get a true result.

Thanks in advance.

Please Wait...