Solving a simple equation...



On Thu, Jun 11, 2009 at 9:05 AM, Julien Martin <balteo at gmail.com> wrote:

>
> 275.0*%e^(-r)+275.0*%e^(-2*r)+275.0*%e^(-3*r)+275.0*%e^(-4*r)+5275.0*%e^(-5*r)=4750.0


(%i1) display2d:false$
(%i2)
275.0*%e^(-r)+275.0*%e^(-2*r)+275.0*%e^(-3*r)+275.0*%e^(-4*r)+5275.0*%e^(-5*r)=4750.0$

Convert approximate numbers (275.0) to exact (275):

(%i3) rat(%),ratprint:false;
(%o3) (275*(%e^r)^4+275*(%e^r)^3+275*(%e^r)^2+275*%e^r+5275)/(%e^r)^5 = 4750

Pull out %e^r (why can't solve do this?)

(%i4) ratsubst(er,%e^r,%);
(%o4) (275*er^4+275*er^3+275*er^2+275*er+5275)/er^5 = 4750

(%i5) solve(%,er);
(%o5) [0 = 190*er^5-11*er^4-11*er^3-11*er^2-11*er-211]

The fact that solve returned the equation shows that it can't find any
solutions algebraically.
Assume we only care about the real root:

(%i6) realroots(%[1]);
(%o6) [er = 35805935/33554432]

(%i7) log(part(%,1,2)),float;
(%o7) 0.064944705754863