Re: making a e-funtion of two coördinates
- To: mathgroup at smc.vnet.net
- Subject: [mg31630] Re: making a e-funtion of two coördinates
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Mon, 19 Nov 2001 03:11:11 -0500 (EST)
- References: <9t86cv$r6l$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Roderik, Make the equations derived from the data e = y == U*E^(a*t) /. {{t -> t1, y -> y1}, {t -> t2, y -> y2}} {y1 == E^(a*t1)*U, y2 == E^(a*t2)*U} We need to help Solve by taking Logs e2=Map[Log, eqns,{2}] {Log[y1] == Log[E^(a*t1)*U], Log[y2] == Log[E^(a*t2)*U]} The problem is that, by default, Mathematic works with complex numbers but we can FullSimplify assuming that a,t1,t2 are real e3=FullSimplify[eqns2, {a,t1,t2}\[Element]Reals] {Log[y1] == a*t1 + Log[U], Log[y2] == a*t2 + Log[U]} Now we can solve s=Solve[e3, {a,U}] {{a -> (-Log[y1] + Log[y2])/(-t1 + t2), U -> E^(((-t2)*Log[y1] + t1*Log[y2])/(t1 - t2))}} Check that this is a solution e/.s {{y1 == E^((t1*(-Log[y1] + Log[y2]))/(-t1 + t2) + ((-t2)*Log[y1] + t1*Log[y2])/(t1 - t2)), y2 == E^((t2*(-Log[y1] + Log[y2]))/(-t1 + t2) + ((-t2)*Log[y1] + t1*Log[y2])/(t1 - t2))}} Simplify[%] {{True, True}} So it is a solution in with no assumptions needed. Of course if we allow complex numbers, as Mathematica does, then there will be other solutions. -- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565 "TheSquaredBun" <veezdREMOVETHIS at hotmail.com> wrote in message news:9t86cv$r6l$1 at smc.vnet.net... > > I have got two coordinates out of graph. The line through the > coordinates could be described as: > > y = U * e^(a * t) > > (e is Exponetial e (approx. 2.37)) > > t is the x-value, I have give two points (t1,y1) and (t2,y2) > > I have tried several things (Solve and Fit for example), but I can't > get the function. > Does anyone know what should be the input to let Mathematica solve the > a and U in the formula. > > Much thanks in advance, > > Roderik > r.f.emmerink at st.hanze.nl >