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.

  • 1
    $\begingroup$ Why is the last option for variables {(Q^(0, 2))[x, t], (Q^(1, 0))[x, t]}? $\endgroup$ Commented Jun 4, 2012 at 20:43
  • 1
    $\begingroup$ 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. $\endgroup$
    – Artes
    Commented Jun 4, 2012 at 20:45
  • $\begingroup$ @ Michael Wijaya actually, I want to remove Q and all derivatives of Q. @ Artes Sorry, not t, y. I changed. $\endgroup$ Commented Jun 4, 2012 at 21:22
  • $\begingroup$ 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. $\endgroup$ Commented Jun 4, 2012 at 21:56
  • 3
    $\begingroup$ @GeorgeMills Your question would be really interesting if you corrected the code as well as pointed out precisely what you'd like to get. $\endgroup$
    – Artes
    Commented Jun 4, 2012 at 22:21

2 Answers 2


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[[1]], x], D[dpolys[[1]], y]};
allpolys = Join[dpolys, derivs];
bigger = Join[allpolys, D[allpolys, x], D[allpolys, y]];

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

In[110]:= 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]}
  • $\begingroup$ @ Daniel yes, but if the pde order is higher, I can not use ths=is code $\endgroup$ Commented Jun 5, 2012 at 10:38
  • $\begingroup$ @George Mills Right. You may need to code up some form of Cartan-Kuranishi for general case handling. $\endgroup$ Commented Jun 5, 2012 at 15:30
  • $\begingroup$ 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/… $\endgroup$ Commented Dec 8, 2012 at 11:21
  • $\begingroup$ 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. $\endgroup$ Commented Dec 8, 2012 at 20:51
  • $\begingroup$ 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 $\endgroup$ Commented 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}]


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

enter image description here

Solve[eq, {Derivative[0, 2][Q][x, t], Derivative[1, 0][Q][x, t]}] // 
   First // Column // TraditionalForm

enter image description here

  • $\begingroup$ @ Vitaliy Kaurov yes, I made printing mistake, instead t should be y, and I want to remove Q and all derivatives of Q. $\endgroup$ Commented Jun 4, 2012 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.