Page 1 sur 1

error with combine((e^x) * e^y,e)

Publié : dim. oct. 07, 2018 2:12 pm
par compsystems
High BP

autosimplify(0):;

combine(ln(x)+ln(y),log), combine(ln(x)-ln(y),log)
=> ln(x*y), ln(x/y)

(a^x)*a^y, expand((a^x)*a^y), combine((e^x) * e^y,exp)
=> "a^x*a^y, a^(x+y), exp(x+y)

(a^x)/a^y, expand((a^x)/a^y), combine((e^x)/e^y,exp)
=> a^x/a^y, a^(x-y),exp(x-y)

combine((e^x) * e^y,e), combine((e^x) / e^y,e) =>
"combine(exp(x)*exp(y),exp(1))"
"Error: Bad Argument Value"

Re: error with combine((e^x) * e^y,e)

Publié : dim. oct. 07, 2018 5:16 pm
par belanger
The second argument to combine should be a function (or class of functions). So (I would think) putting a number as the second argument should return an error.

Re: error with combine((e^x) * e^y,e)

Publié : dim. oct. 07, 2018 5:20 pm
par compsystems
but e==exp(1) returns true

I think, that should accept the expression exp(1) as synonymous with e, just like ln does with log.

Re: error with combine((e^x) * e^y,e)

Publié : lun. oct. 08, 2018 9:11 am
par parisse
e is not the same type as exp, e is a number, exp is a function.

Re: error with combine((e^x) * e^y,e)

Publié : lun. oct. 08, 2018 2:56 pm
par compsystems
ok, but the CAS could support symbols, which can be very useful in programming

for example

combine( (a^x) * a^y, a) [enter] this would return a^(x+y)

combine( (a^x) / a^y, a) [enter] this would return a^(x-y)