0
$\begingroup$

I have equation E^y = x. How can I use Mathematica to solve all of "y" from the desired "x" value. For example, I want to solve for "y" from x = 0.5 , 1 , 1.5 , 2 , .... , 9.5 , 10. The solution should be (x=0.5 | y= -0.693) , (x=1 | y=0) , (x=2 | y=0.693) , ..... , (x=10 | y=2.302).

PS. Solving without algebraic technique e.g. Without taking Ln at both sides. Because the real equation is quite complicated which cannot be solved. The equation above is just an example.

$\endgroup$
  • $\begingroup$ Do you want to run a minimization? It's not clear why you want it done without algebraic technique. Can you please explain better the context and what you are after? By the way, welcome to Mma.SE. Please follow this advice: taking the tour now, learn about asking and what's on-topic. Always include minimal working example of code and data in formatted form. By doing all this you help us to help you and likely you will inspire great answers. $\endgroup$ – rhermans Jul 23 '19 at 14:00
  • $\begingroup$ Because the real equation is quite complicated which cannot be solved. $\endgroup$ – Ron Jul 23 '19 at 14:04
  • $\begingroup$ Please edit your question and explain that there. Does it take long for your equation to evaluate? Don't make us guess the information necessary to reproduce your problem. $\endgroup$ – rhermans Jul 23 '19 at 14:06
1
$\begingroup$

If you're looking for an numeric solution try

soly[x_] := Values@ NSolve[Exp[y] == x, y, Reals][[1, 1]] (*"solver"*)
Table[{x, soly[x]}, {x, 0.5, 10, .5}]
(*{{0.5, -0.693147}, {1., 0.}, {1.5, 0.405465}, {2., 0.693147}, {2.5,0.916291}, 
{3., 1.09861}, {3.5, 1.25276}, {4., 1.38629}, {4.5,1.50408}, {5., 1.60944}, 
{5.5, 1.70475}, {6., 1.79176}, {6.5,1.8718}, {7., 1.94591}, {7.5, 2.0149}, 
{8., 2.07944}, {8.5,2.14007}, {9., 2.19722}, {9.5, 2.25129}, {10., 2.30259}}*)
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you so much. $\endgroup$ – Ron Jul 23 '19 at 14:16
  • $\begingroup$ You're welcome! $\endgroup$ – Ulrich Neumann Jul 23 '19 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.