Comparing formulas?

Comparing formulas? - Messages

#1 Posted: 5/1/2010 1:17:48 PM
LordMike

LordMike

0 likes in 52 posts.

Group: User

How do I compare two formulas?

Like, if I simplify by hand, or solve for x by hand - and I'd like to check if I did it correctly.
What I want to compare, are two equations...

For example:
y = ax + b

And then compare to:
x = (y - b ) / a

And have it reply with "True".

As compared to if I wrote x = (- y - b ) / - a
#2 Posted: 5/2/2010 10:32:23 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Helo Mike,

At the moment, for this kind of problem you have to use some CAS (Maxima maybe?)

 Solve over x
>:: sol1:=solve(y=a*x+b,x)
 
                                        y - b
                                   [x = -----]
                                          a
 
 Solved by hand
>:: sol2:=(-y-b)/a
 
                                     - y - b
                                     -------
                                        a
 
 Compared
>:: if(at(x,sol1)=sol2) then "true" else "false"
 
                                      false
 
 Compared
>:: if(at(x,sol1)=(y-b)/a) then "true" else "false"
 
                                      true
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Posted: 5/4/2010 9:35:18 PM
LordMike

LordMike

0 likes in 52 posts.

Group: User

Ah, so it is not possible :P

Thanks for reply
#4 Posted: 5/8/2010 7:05:03 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: Super Administrator

Wrote

Ah, so it is not possible :P


Why?


(download source file)

Best regards.
#5 Posted: 5/8/2010 8:12:22 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,

I was thinking in this direction, but unfortunately this is not so simple. Please see the examples.
Wrong answer "true", it should be "false":

Neither "true" nor "false". If statement needs the numerical result of the logical contidion.


Regards,
Radovan



When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#6 Posted: 5/8/2010 8:35:01 PM
Andrey Ivashov

Andrey Ivashov

2270 likes in 3734 posts.

Group: Super Administrator

Ok, then we can use this stuff:


(download source file)

Regards.
#7 Posted: 5/8/2010 8:58:28 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Andrey,

Yes, I think you are right . We were thinking on the same thing at this very moment.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • New Posts New Posts
  • No New Posts No New Posts