question on simplifying, solving, and substituting
Subject: question on simplifying, solving, and substituting
From: Uzuner, Tolga
Date: Mon, 5 Sep 2005 17:05:38 +0100
Dear Fellow Maxima Users,
Apologies for what may appear to be a simple question. I have two equations:
eq1:
h=ln(1+s/(1-r))
and
eq2:
p=1-exp(-h*t)
I want to solve for s, in terms of p, which means I have to:
1. solve for s in eq1
2. solve for h in eq2
3. substitute the result of step 2 into step 1
I can do this by hand with the following commands:
(%i2) eq1: h=log(1+s/(1-r));
s
(%o2) h = LOG(----- + 1)
1 - r
(%i3) eq2: p=1-exp(-h*t);
- h t
(%o3) p = 1 - %E
(%i4) solve([eq1],[s]);
h h
(%o4) [s = (1 - %E ) r + %E - 1]
(%i5) radcan(solve([eq2],[h]));
1
LOG(- -----)
p - 1
(%o5) [h = ------------]
t
and then do:
(%i8) radcan(subst(-log(1-p)/t,h,solve([eq1],[s])));
1/t 1/t
((1 - p) - 1) r - (1 - p) + 1
(%o8) [s = -----------------------------------]
1/t
(1 - p)
(%i9)
I have two questions:
1. Is there a way that I can do all of this in one fell swoop, i.e. submit the two equations eq1 and eq2 and solve for s in terms of h
2. What is THE most generic simplifier in Maxima ? Is radcan the right choice or is there a more generic algebraic simplifier ?
Many thanks,
Tolga
Please follow the attached hyperlink to an important disclaimer
<http://www.csfb.com/legal_terms/disclaimer_europe.shtml>;
==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.csfb.com/legal_terms/disclaimer_external_email.shtml
==============================================================================