1
$\begingroup$

I just started using mathematica and I'm facing a problem that I just can't solve. I want to solve the following equation: enter image description here

Code:

eqn = {(ao)/((c*Exp[a*(n - o)/n]) (-Log[(c*Exp[a*(n - o)/n])] + Log[c] + a)^2) == m, 
       ao*1/2 < n};

Solve[eqn, n, Reals]

Program says ' This system cannot be solved with the methods available to Solve.'

Can anybody help me with this?

$\endgroup$
6
  • $\begingroup$ This equation is highly nonlinear equation. you may use FindRoot but you need to provide numerical values to other variables. $\endgroup$ Commented Jun 24, 2014 at 15:06
  • $\begingroup$ Thank you very much for your quick reply. I tried using FindRoot but didn't succeed. $\endgroup$
    – Andy
    Commented Jun 24, 2014 at 15:39
  • 1
    $\begingroup$ You may start by something like this r = Reduce[eqn[[1]] /. a*(n - o)/n -> x /. {n -> (a o)/(a - x)}, x, Reals]; FullSimplify[r /. x -> a*(n - o)/n, Assumptions -> ao*1/2 < n] $\endgroup$ Commented Jun 24, 2014 at 15:44
  • $\begingroup$ If you give specific values for the parameters ao, a, etc. then it becomes amenable to Solve. $\endgroup$ Commented Jun 24, 2014 at 15:57
  • $\begingroup$ @Daniel: Is that so?! Thx, I will try that. $\endgroup$
    – Andy
    Commented Jun 24, 2014 at 16:11

1 Answer 1

2
$\begingroup$

If you use FindRoot you can get some solutions. I don't know what range of values that you are expecting but I will assume some.

eq = (ao)/((c*
      Exp[a*(n - o)/n]) (-Log[(c*Exp[a*(n - o)/n])] + Log[c] + a)^2)
Plot[{eq /. {a -> 1, c -> 1, o -> 1, ao -> 1}, 20}, {n, 0, 10}]

enter image description here

for this set of values you will have two roots. you can find them as follows:

    FindRoot[(eq /. {a -> 1, c -> 1, o -> 1, ao -> 1}) == 20, {n, 2}]
   (* {n -> 6.85462} *)

    FindRoot[(eq /. {a -> 1, c -> 1, o -> 1, ao -> 1}) == 20, {n, .2}]
   (* {n -> 0.121873} *)
$\endgroup$
3
  • $\begingroup$ Looks good! Although, I was hoping to create a universal solution without using values. $\endgroup$
    – Andy
    Commented Jun 24, 2014 at 16:13
  • $\begingroup$ This is why i added the term (ao)/2 < n. This is the inflection point, so I'm just looking on the right part of the function with only one solution for n. $\endgroup$
    – Andy
    Commented Jun 24, 2014 at 16:17
  • $\begingroup$ @Andy as I said, the equation is highly nonlinear with multi variables. I don't think you can find a universal solution to the problem. you can get bunch of solutions and then use regression analysis to find empirical relationship. $\endgroup$ Commented Jun 24, 2014 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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