# Solve the following equation?

Posted 5 months ago
568 Views
|
3 Replies
|
0 Total Likes
|
 I'm a beginner to Mathematica. I had the following code: Solve[-0.45 - 8./(1 + 3 E^(-x/30)) + (80 E^(-x/30) (0.65 - 0.01 x))/(1 + 3 E^(-x/30))^2==0,x] This error appeared: "Solve::inex: 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." I suppose it is because E is inexact. How would I go about solving this equation then?
3 Replies
Sort By:
Posted 5 months ago
 For trascendental equations it is useful to give a bounded interval where to search, for example: Solve[-0.45 - 8./(1 + 3 E^(-x/30)) + (80 E^(-x/30) (0.65 - 0.01 x))/(1 + 3 E^(-x/30))^2 == 0 && 0 < x < 20, x] I chose the interval 0 < x < 20 after plotting the function.
Posted 5 months ago
  eq = -0.45 - 8./(1 + 3 E^(-x/30)) + (80 E^(-x/30) (0.65 - 0.01 x))/(1 + 3 E^(-x/30))^2; Solve[Rationalize[eq, 0] == 0, x, Reals] (* {{x -> Root[{81 + 169 E^(#1/15) + E^(#1/30) (-506 + 16 #1) &, -96.939605776733132399}]}, {x -> Root[{81 + 169 E^(#1/15) + E^(#1/30) (-506 + 16 #1) &, 12.3348914426321591897}]}} *) NSolve[eq == 0, x, Reals] {{x -> -96.9396}, {x -> 12.3349}} Or use FindRoot.  {FindRoot[eq, {x, 10}],FindRoot[eq, {x, -90}]} (* {{x -> 12.3349}, {x -> -96.9396}} *) 
Posted 5 months ago
 E is exact. But .45 is not exact, it is a decimal approximation. One might instead use 9/20.
Community posts can be styled and formatted using the Markdown syntax.