# Eliminate doesn't work in Mathematica

Hello Mathematica users,

I have problems trying to eliminate variable $Q(x,y)$ froma PDE, but Mathematica output is just True. The problem is that I already found how to eliminate it. We can apply $d/dx$ on the second equation and then from the first equation we can determine and substitute $dQ[x,y]/dx$ in the second.

Why can't Mathematica do that? My output is in that case a PDE of fourth order, but I don't have Q[x,y], which is the aim, and I solved it by hand.

 Eliminate[{A0*D[w[x,y],{y,2}]-B0*D[w[x,y],{x,2}]-
C0*D[Q[x,y],{x,1}]+C0*D[w[x,y],{x,2}]==0,
E0*D[Q[x,y],{y,2}]-FF0*D[Q[x,y],{x,2}]-CC0*D[w[x,y],{x,1}]-Q[x,y]==0},
{(Q^(0,2))[x,y],(Q^(1,0))[x,y],Q[x,y]}]

• Why is the last option for variables {(Q^(0, 2))[x, t], (Q^(1, 0))[x, t]}? Jun 4, 2012 at 20:43
• 1. Does Q depend on (x,y) or (x,t) ? 2. You should use Derivative[0, 2][Q][x, t] instead of (Q^(0,2))[x,t] etc. Jun 4, 2012 at 20:45
• @ Michael Wijaya actually, I want to remove Q and all derivatives of Q. @ Artes Sorry, not t, y. I changed. Jun 4, 2012 at 21:22
• You say you corrected the typo. But did you try to copy and paste code from your question into Mathematica? It fails. Please correct it. @MichaelWijaya suggestion is right. Also I am not sure about your " I want to Q and all derivatives of Q" - don't you have to basically solve differential equation for this? Please, explain. Jun 4, 2012 at 21:56
• @GeorgeMills Your question would be really interesting if you corrected the code as well as pointed out precisely what you'd like to get. Jun 4, 2012 at 22:21

Eliminate, and its cousin GroebnerBasis, work with algebraic equations. If you require differential elimination you will need to take derivatives (prolongations, that is). Here is a blind approach: just take some derivatives, sort the variables into two sets, and eliminate all the Q stuff.

dpolys = {A0*D[w[x, y], {y, 2}] - B0*D[w[x, y], {x, 2}] -
C0*D[Q[x, y], {x, 1}] + C0*D[w[x, y], {x, 2}],
E0*D[Q[x, y], {y, 2}] - FF0*D[Q[x, y], {x, 2}] -
CC0*D[w[x, y], {x, 1}] - Q[x, y]};
derivs = {D[dpolys[], x], D[dpolys[], y]};
allpolys = Join[dpolys, derivs];
bigger = Join[allpolys, D[allpolys, x], D[allpolys, y]];

In:= params = {A0, B0, C0, CC0, E0, FF0};
vars = Complement[Variables[bigger], params];
qvars = Select[Variables[bigger], ! FreeQ[#, Q] &];
wvars = Complement[vars, qvars];

In:= GroebnerBasis[bigger, wvars, qvars,
MonomialOrder -> EliminationOrder]

{(-A0)*Derivative[0, 2][w][x, y] + A0*E0*Derivative[0, 4][w][x, y] +
B0*Derivative[2, 0][w][x, y] - C0*Derivative[2, 0][w][x, y] -
C0*CC0*Derivative[2, 0][w][x, y] -
B0*E0*Derivative[2, 2][w][x, y] +
C0*E0*Derivative[2, 2][w][x, y] -
A0*FF0*Derivative[2, 2][w][x, y] +
B0*FF0*Derivative[4, 0][w][x, y] -
C0*FF0*Derivative[4, 0][w][x, y]}

• @ Daniel yes, but if the pde order is higher, I can not use ths=is code Jun 5, 2012 at 10:38
• @George Mills Right. You may need to code up some form of Cartan-Kuranishi for general case handling. Jun 5, 2012 at 15:30
• Here is a example for problem with more variables and more equations (three), but your code consumes long time for computing. mathematica.stackexchange.com/questions/15949/… Dec 8, 2012 at 11:21
• I had played with that one. I was unable to find a path to getting enough equations, relative to the number of variables, in order to effect the desired elimination. Dec 8, 2012 at 20:51
• But the system is possible to solve in Maple, but I dont know how to do that in Mathematica. There are three equations, three variables p1 q1 and q2 so it is clear that it is possible to remove two variables q1 and q2 Dec 8, 2012 at 23:06

Generally if you have n variables you need to have at least n+1 equations to get meaningful elimination and end up with at least one equation. With m equations and k variables you get m-k resulting equations after elimination (in a well defined system). Your case is two variables and two equations which results of course in this:

 Eliminate[{x == 2 + y, y == z - 5 x}, {x, y}]


True

While meaningful request for Eliminate would be for example

 Eliminate[{x == 2 + y, y == z - 5 x}, x]


-10 + z == 6 y

My suspicion is you just would like to express your variables via the rest of stuff, which can be done with Solve:

eq={A0*Derivative[0, 2][w][x, t] + C0*Derivative[2, 0][w][x, y] ==
C0*Derivative[1, 0][Q][x, t] + B0*Derivative[2, 0][w][x, t],
Q[x, y] + CC0*Derivative[1, 0][w][x, y] + FF0*Derivative[2, 0][Q][x, y] ==
E0*Derivative[0, 2][Q][x, t]};

eq // Column // TraditionalForm Solve[eq, {Derivative[0, 2][Q][x, t], Derivative[1, 0][Q][x, t]}] //
First // Column // TraditionalForm • @ Vitaliy Kaurov yes, I made printing mistake, instead t should be y, and I want to remove Q and all derivatives of Q. Jun 4, 2012 at 21:23