distributive property and exponents

Hello,

I need some help to figure out how to get maple to use distributive property and rules of exponents.

>A:=R/(1+exp(-2(h-s))

>a:=A/(exp(h-s))

I would like to get the answer back in the form

R/(exp(h-s)+exp(-(h-s))

suggestions?

Hallo, If you know the

Hallo,

 just re-type your expression in the form you want to have. It seems to be uncool, but it is the fastest way. One could disagree and say, that if i know the proper comands for this task, i would have an easy job next time this kind of problem occurs.  But this never happened to me. Term manipulation is awkward in Maple.

epostma's picture

Programmatic solution

On the other hand, if you need to do this programmatically, you could do it like this:

b := numer(a)/combine(frontend(expand, [denom(a)]), exp);

Note that I apply these constructs specifically to the denominator; if you need it to apply to the numerator as well, you can adjust it accordingly.

thanks

I didn't think of that.  Thanks for your help.  I think it should be easier.  Maybe in a later edition it will be easier. 

Groshong

another path

You could try this:

A:=R/(1+exp(-2*(h-s)));

a:=A/(exp(h-s));

expand(1/a);

simplify(%);

1/%;

 

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}