# How to make logical tests for general function expressions

Posted 8 years ago
7587 Views
|
|
0 Total Likes
|
 hey matheamtica community,im working on a project and i got a problem. I want to perform a logical test in order to check if two expression are the same. my code is the following: test1 = (2 epsH r[b[t]] - b[t] (1 + r[b[t]])^2)/( b[t] (-2 epsH + b[t] (1 + r[b[t]]))) test2 = (2*epsH - (((1 + r[b[t]])*(2*epsH - b[t]*(1 + r[b[t]])))))/(b[ t]*(2*epsH - b[t] (1 + r[b[t]]))) test3 = test1 == test2 Expand[test3] i mean i got the basics of doing logical tests f.e : In[86]:= x = 5 Out[86]= 5 In[87]:= x == 7 Out[87]= False But i read in the documentation about "Equal" that the command "Expand" should do the deal for what i want but appareantly it isnt doing a logical test but rather expanding both expressions. I would be greatful if someone can gibve me a hand and maybe explain me what i misunderstood about the language of mathematica for this case. ty a lot for all answers
Sort By:
Posted 8 years ago
 Try Simplify instead of Expand In[4]:= Simplify[test3] Out[4]= True `
Community posts can be styled and formatted using the Markdown syntax.