2
$\begingroup$

I define the following functions:

left[x_] := -c Exp[alpha x]

box[x_] := a Sin[k x] + b Cos[k x]

right[x_] := c Exp[-alpha x]

dleft[x_] = D[left[x], x]

dbox[x_] = D[box[x], x]

dright[x_] = D[right[x], x]

Next I have a system of 4 equations:

Eliminate[{

left[-l] == box[-l] && 

dbox[l] == dright[l] && 


   right[l] == box[l] && 

dleft[-l] == dbox[-l]
  }, {a, b, c}, InverseFunctions -> True]

I expect to get k cot[k l] = -alpha. Instead I get "True" as the answer.

IF I use the command (drop c from elimination list):

Eliminate[{left[-l] == box[-l] && dbox[l] == dright[l] && 
   right[l] == box[l] && dleft[-l] == dbox[-l]
  }, {a, b}, InverseFunctions -> True]

I get: alpha c Sin[k l] == -c k Cos[k l] which is the correct answer if you cancel c from both sides.

Can you please tell me what am I doing wrong ?

$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey Mar 2 '15 at 20:43
2
$\begingroup$

Eliminate uses the given set of equations to eliminate the requested variables from those equations, returning the equations not needed to do the eliminations. Thus,

Eliminate[{left[-l] == box[-l] && dbox[l] == dright[l] && right[l] == box[l] && 
    dleft[-l] == dbox[-l]}, {a, b}, InverseFunctions -> True]

eliminates variable a and b, returning the remaining equation.

(* alpha c Sin[k l] == -c k Cos[k l] *)

To Eliminate the remaining variable, c requires the use of the remaining equation

Eliminate[%, {c}]

leaves no equations, and Eliminate returns

(* True *)

(Why it does not return Null, instead, I do not know.)

This behavior is illustrated perhaps more clearly in the simple example,

Eliminate[e == 1 && d == 1, e]
(* d == 1 *)
Eliminate[%, d]
(* True *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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