Comparing formulas?

Comparing formulas? - Messages

#1 Posted: 2010/5/1 13:17:48
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: 2010/5/2 22:32:23
Radovan Omorjan

Radovan Omorjan

325 likes and 1 dislikes in 2,052 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: 2010/5/4 21:35:18
LordMike

LordMike

0 likes in 52 posts.

Group: User

Ah, so it is not possible :P

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

Andrey Ivashov

2,315 likes in 3,949 posts.

Group: Super Administrator

Wrote

Ah, so it is not possible :P


Why?


(download source file)

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

Radovan Omorjan

325 likes and 1 dislikes in 2,052 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: 2010/5/8 20:35:01
Andrey Ivashov

Andrey Ivashov

2,315 likes in 3,949 posts.

Group: Super Administrator

Ok, then we can use this stuff:


(download source file)

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

Radovan Omorjan

325 likes and 1 dislikes in 2,052 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
  • No New Posts