# How to get a solution for the following equation?

When I try to solve this equation using Mathematica:

Solve[Exp[b*x]-c*(x^2)-a*x-1 == 0, x] /. {a -> 6.336, b -> 8, c -> 32}


I don't get any result and this error message:

Solve was unable to solve the system with inexact coefficients or the system obtained by direct rationalization of inexact numbers present in the system. Since many of the methods used by Solve require exact input, providing Solve with an exact version of the system may help.

Out[60]= Solve[-1 + E^(8 x) - 6.336 x - 32 x^2 == 0, x]

I also tried Reduce and Nsolve instead of Solve with no luck!!

Note that I don't get even the obvious solution of x==0. Although I would like to have a solution with x!=0.

• x==0 is an obvious solution. Commented Feb 10, 2014 at 16:34
• Ok I should have mentioned that I need a solution where x!=0. But I don't even get x==0 as the solution!! I don't understand why!! Commented Feb 10, 2014 at 16:37
• Please read about FindRoot in the docs. Commented Feb 10, 2014 at 16:45
• Using FindRoot I get x==0 as the solution. Thanks for it. But I want to get solution where x!=0. Commented Feb 10, 2014 at 16:55
• It looks like x==0 is the only solution for your choice of parameters. You might get non zero solutions for other choices, for instance Solve[(expr /. b -> 0) == 0, x]. Commented Feb 10, 2014 at 17:00

Solve and Reduce are exact methods for solving exact equations. If there are no known ways to produce an analytical solution, these functions cannot furnish an answer. Equations of the form you describe don't have a known closed-form solution. NSolve is also an exact method, but returns numerical results, so it too will not be useful here.

If all you want are numerical solutions, then use FindRoot.

That said, it should be clear that $x = 0$ is the only real-valued solution. This can be seen by taking the derivative of $f(x) = e^{bx} - cx^2 - ax - 1$, resulting in $f'(x) = be^{bx} - 2cx - a$, and for the given choices for $a,b,c$, the minimum possible value of $f'(x)$ is $1.664$, meaning $f$ is strictly increasing for all reals. Since $x = 0$ is a solution, it is the unique solution.

There are infinitely many complex-valued solutions.

• Thanks for the comments, indeed this helps since it is possible that the system may not have a solution. I asked since the Mathematica output doesn't say that clearly. Now it seems more clear to me. Commented Feb 10, 2014 at 17:12

y[x_]=-1+E^(8 x)-6.336 x-32 x^2

(* y[x_]=-6.336 x-32 x^2 *)

NSolve[y[x]==0,x]

Plot[{y[x],y'[x],y''[x]},{x,-0.6,.4},PlotStyle->{Thick},GridLines->Automatic]

Plot[{y[x],y'[x],y'''[x] },{x,-0.6,.4},PlotStyle->{Thick},GridLines->Automatic]

{y[0],y'[0],y''[0],y'''[0]}

You configured a function that has { a root, a small value of first derivative , and, an inflexion point } respectively@ x=0. Method fails by choice of vanishing first and third derivatives.

Newton's iteration also fails as the chosen extremely small derivative value @ x=0 fails to lock in the root there.

NSolve for y[x_] = x - c Sin[x] where c is any real constant will also fall into the same trap, if it is not discourteous to say so.

If you had chosen the second parabolic function I indicated, NSolve would do it as succesive derivatives beyond third order ( that exist in an exponential function) cannot not exert any influence.

Perhaps this was aimed to put the Mathematica NSolve algorithms to test ... an action point for them. A workaround to fix the algorithm also may not be too difficult in view of useful nonzero third derivative there. Or,alternately, the other (rudimentary) Regula Falsi can also help, but I do not know if the user has any choice of method.