Comparing formulas?

Comparing formulas? - Сообщения

#1 Опубликовано: 01.05.2010 13:17:48
LordMike

LordMike

0 сообщений из 52 понравились пользователям.

Группа: 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 Опубликовано: 02.05.2010 22:32:23
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: 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 Опубликовано: 04.05.2010 21:35:18
LordMike

LordMike

0 сообщений из 52 понравились пользователям.

Группа: User

Ah, so it is not possible :P

Thanks for reply
#4 Опубликовано: 08.05.2010 19:05:03
Andrey Ivashov

Andrey Ivashov

2270 сообщений из 3734 понравились пользователям.

Группа: Super Administrator

Wrote

Ah, so it is not possible :P


Why?


(download source file)

Best regards.
#5 Опубликовано: 08.05.2010 20:12:22
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: 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 Опубликовано: 08.05.2010 20:35:01
Andrey Ivashov

Andrey Ivashov

2270 сообщений из 3734 понравились пользователям.

Группа: Super Administrator

Ok, then we can use this stuff:


(download source file)

Regards.
#7 Опубликовано: 08.05.2010 20:58:28
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: 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!"
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений