Ask Your Question

finding solutions with exponential series expansion

asked 2018-11-22 16:53:33 -0600

anonymous user


Hi, I couldnt recall how to solve the following for t

0.111t = 1- e^(-0.3t) . (The ans is t=8).

Thank you in advance !! Mich

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2018-11-23 12:14:26 -0600

Emmanuel Charpentier gravatar image

updated 2018-11-23 16:38:38 -0600

The steps (and graphs !) of this solution are available in Sagecell

Let's see. We suppose for now that this equation is to solve in reals :

var("t", domain="real")
Ex=0.111*t-(1- e^(-0.3*t))

We note an "obvious" root :


Is there an explicit solution ?

[t == 1000/111*(2*e^(3/10*t) - 1)*e^(-3/10*t)]

No such luck : this is an implicit solution, no more informative than the original equation. Let's try a numerical solution. What is the shape of the representative curve of this expression ? A curve with a minimum around about 3, null at 0 and about 8, decreasing below 3 and increasing above 3 (see Sagecell). What can we prove ?

The first derivative is

-0.300000000000000*e^(-0.300000000000000*t) + 0.111000000000000

An increasing curve, null about 3. Can we prove that ? The second derivative is


Yay ! This is strictly positive for all reals. Therefore, the zero we "see" on the first derivative at about 3 is the only one, and is

[t == 10*log(1/37*100^(1/3)*37^(2/3))]

Now we have proven that Ex is decreasing before this zero and increasing after that. At the minimum, it is :


Since it is negative at this point and not upward bound (exercise for the reader : prove it !), it has two roots, one (0) being already known. The graphs suggest that Ex is positive for t=10. Let's try to find a numerical solution :


which is the sought answer.

Left to the reader : what are the complex roots (if any...) ? Fair warning : this one is much harder than the real case (bound to problems open since the XIXth century, and still not solved...).

EDIT : It turns out that Sympy can give us the non-trivial real root in symbolic form :

sage: import sympy
sage: sympy.solve(Ex, t)
[10*LambertW(-100*exp(-100/37)/37)/3 + 1000/111,
 10*LambertW(-100*exp(-100/37)/37, -1)/3 + 1000/111]

The numerical values are as expected :

sage: [s.n() for s in sympy.solve(Ex, t)]
[8.25101463236202, 0.e-123]

This function is known to Sage, but the conversion is incorrect (loses the second argument)

sage: [s._sage_() for s in sympy.solve(Ex, t)]
[10/3*lambert_w(-100/37*e^(-100/37)) + 1000/111,
 10/3*lambert_w(-100/37*e^(-100/37)) + 1000/111]

This is now Trac#26752

edit flag offensive delete link more


Thank you for your help!! ( I m still surprised that the eqn. looks simple, but yet it can be tricky to solve. But appreciate your help !)

Mich gravatar imageMich ( 2018-11-24 17:46:10 -0600 )edit

answered 2018-11-23 17:44:26 -0600

slelievre gravatar image

The value 8 is not a solution, but there is a solution whose approximate solution is 8.2510146...

Here are some ways to work on solving this equation.

Define t as a symbolic variable in the symbolic ring, and call eq the equation.

sage: t = SR.var('t')
sage: eq = 0.111*t == 1-exp(-0.3*t)

Try to solve with solve: unfortunately, Sage returns an equation which is equivalent to the equation we started with.

sage: solve(eq, t)
[t == 1000/111*(e^(3/10*t) - 1)*e^(-3/10*t)]

Use find_root to find an approximate solution between 5 and 10.

sage: eq.find_root(5, 10)


sage: find_root(eq, 5, 10)

The computation above is done using floating-point computations and it is not clear which digits are exact.

For a computation using arbitrary precision, use the mpmath library: define a function equal to the difference of the left-hand side and the right-hand side of eq and use mpmath.findroot to look for a root near 8:

sage: import mpmath
sage: mpmath.findroot(lambda t: 1 - exp(-0.3*t) - 0.111*t, 8)

See the answer by @Emmanuel Charpentier for how to use SymPy to get an exact solution in symbolic form. It is likely Giac or FriCAS could do it too.

edit flag offensive delete link more


Neither Fricas nor Giac can solve this symbolically :

sage: giac("solve(111*t/1000-(1-exp(-3*t/10)),t)")
sage: fricas("solve(111*t/1000-(1-exp(-3*t/10)),t)")

Mathematica gives an answer subsuming Sympy's and asserting the existence of an infinity of (complex) solutions :

sage: mathematica("Reduce[111*t/1000==1-Exp[-3*t/10],t]")
(Element[C[1], Integers] && 
  t == 1000/111 + (10*ProductLog[C[1], -100/(37*E^(100/37))])/3) || t == 0

(Reformatted from Mathematica's help) :

gives the principal solution for w in z == w e^w. 
gives the k^th solution.

From Sage's lambert_w? :

This function satisfies the equation

  z = W_n(z)  e^{W_n(z)}

Same difference...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2018-11-24 13:26:11 -0600 )edit

Thank you for your help!! ( I m still surprised that the eqn. looks simple, but yet it can be tricky to solve. But appreciate your help !)

Mich gravatar imageMich ( 2018-11-24 17:45:51 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-11-22 16:53:33 -0600

Seen: 40 times

Last updated: Nov 23