Hello, I would like to find c2 as 0.66 + 0.34 * (1 + 1.0 / c2) - 1.0 / ln(1 + c2) - 0.7 == 0 Thus I used the function solve like so: c2 = Symbol('c2') solve(0.66 + 0.34 * (1 + 1.0 / c2) - 1.0 / ln(1 + c2) - 0.7, c2) But I got the following error:
NotImplementedError Traceback (most recent call last) > <ipython-input-86-f1264f7163f3> in <module>() > ----> 1 solve(0.66 + 0.34 * (1 + 1.0 / c2) - 1.0 / ln(1 + c2) - 0.7, c2) > > /usr/lib/python2.7/site-packages/sympy/solvers/solvers.pyc in solve(f, > *symbols, **flags) > 883 > ########################################################################### > 884 if bare_f: > --> 885 solution = _solve(f[0], *symbols, **flags) > 886 else: > 887 solution = _solve_system(f, symbols, **flags) > > /usr/lib/python2.7/site-packages/sympy/solvers/solvers.pyc in _solve(f, > *symbols, **flags) > 1382 if result is False: > 1383 raise NotImplementedError(msg + > -> 1384 "\nNo algorithms are implemented to solve equation %s" % f) > 1385 > 1386 if flags.get('simplify', True): > > NotImplementedError: multiple generators [c2, log(c2 + 1)] > No algorithms are implemented to solve equation 3/10 - 1/log(c2 + 1) + > 17/(50*c2) > I read at http://docs.sympy.org/dev/tutorial/solvers.html#solving-equations-algebraically </> that this error often means that the solution cannot be represented symbolically. Is it the case of my equation? If I can't use solve to find c2 , then what can I use? I already tried to use the function roots like so: c2 = Symbol('c2') roots(0.66 + 0.34 * (1 + 1.0 / c2) - 1.0 / ln(1 + c2) - 0.7, c2) Then I got this error: > PolynomialError Traceback (most recent call last) > <ipython-input-94-fe98ccb57669> in <module>() > ----> 1 roots(0.66 + 0.34 * (1 + 1.0 / c2) - 1.0 / ln(1 + c2) - 0.7, c2) > > /usr/lib/python2.7/site-packages/sympy/polys/polyroots.pyc in roots(f, > *gens, **flags) > 759 else: > 760 try: > --> 761 f = Poly(f, *gens, **flags) > 762 except GeneratorsNeeded: > 763 if multiple: > > /usr/lib/python2.7/site-packages/sympy/polys/polytools.pyc in __new__(cls, > rep, *gens, **args) > 93 return cls._from_poly(rep, opt) > 94 else: > ---> 95 return cls._from_expr(rep, opt) > 96 > 97 @classmethod > > /usr/lib/python2.7/site-packages/sympy/polys/polytools.pyc in > _from_expr(cls, rep, opt) > 203 def _from_expr(cls, rep, opt): > 204 """Construct a polynomial from an expression. """ > --> 205 rep, opt = _dict_from_expr(rep, opt) > 206 return cls._from_dict(rep, opt) > 207 > > /usr/lib/python2.7/site-packages/sympy/polys/polyutils.pyc in > _dict_from_expr(expr, opt) > 325 > 326 if opt.gens: > --> 327 rep, gens = _dict_from_expr_if_gens(expr, opt) > 328 else: > 329 rep, gens = _dict_from_expr_no_gens(expr, opt) > > /usr/lib/python2.7/site-packages/sympy/polys/polyutils.pyc in > _dict_from_expr_if_gens(expr, opt) > 266 def _dict_from_expr_if_gens(expr, opt): > 267 """Transform an expression into a multinomial form given > generators. """ > --> 268 (poly,), gens = _parallel_dict_from_expr_if_gens((expr,), opt) > 269 return poly, gens > 270 > > /usr/lib/python2.7/site-packages/sympy/polys/polyutils.pyc in > _parallel_dict_from_expr_if_gens(exprs, opt) > 171 coeff.append(factor) > 172 else: > --> 173 raise PolynomialError("%s contains an > element of the generators set" % factor) > 174 > 175 monom = tuple(monom) > > PolynomialError: 1/log(c2 + 1) contains an element of the generators set > What does that mean ? Thank you in advance for your help. Cheers, Camille -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/8abfc70b-7c43-43e6-811d-4b8cc5372d60%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.