1
$\begingroup$

So I have

Emin[T_, d_] := If[T == 0, 0, 1/(-1 + E^(1/T)) - d/(-1 + E^(d/T))];

which I can solve wonderfully for

Solve[Emin[T, 10] == 0.5, T, Reals]

{{T -> 0.910427}}

Now as you see Emin[T_, d_] is also dependent on d which I set to d=10 in the second line.

All I'd like is to now Plot this solve for different d.

I've got so far this:

Tlist = Table[Solve[Emin[T, d] == 0.5, T, Reals] // Values // Flatten // N, {d, 5, 10}]

{{0.936864}, {0.919994}, {0.913886}, {0.911604}, {0.910747}, {0.910427}}

But as you see I cannot plot this because d is missing in those entries.

So can anyone either help me add the correct d value to the entries or maybe help me plot this even simpler? Thanks in advance !

$\endgroup$
0
$\begingroup$

Reformatting a little:

Emin[T_, d_] := If[T == 0, 0, 1/(-1 + E^(1/T)) - d/(-1 + E^(d/T))]; 
Tlist = Table[{d, First[Solve[Emin[T, d] == 0.5, T, Reals] 
              // Values // Flatten // N]}, {d, 5, 10}] // Quiet

ListPlot[Tlist]

enter image description here

$\endgroup$
2
$\begingroup$

With the additional information d01,2,3...10 try

dT = Table[{d, T /. NSolve[Emin[T, d] == 0.5, T, Reals][[1]]}, {d, 1,10}]
(*{{1, T /. {}[[1]]}, {2, T /. {}[[1]]}, {3, 1.19888}, {4,0.988141},
{5, 0.936864}, {6, 0.919994}, {7, 0.913886}, {8,0.911604}, {9, 0.910747}, {10, 0.910427}}*)

Show[ContourPlot[Emin[T, d] == 0.5, {d, 0, 10}, {T, .5, 2},FrameLabel -> {T, d}], Graphics[Point[dT[[3 ;;]]]]]

enter image description here

$\endgroup$
  • $\begingroup$ That is a step in the right direction but I'd rather have d on the x-axis and T on the y axis. Also d can have only integer numbers. Sorry should have mentioned that i.e. d = 1,2,3,...,10. $\endgroup$ – CatoMaths Feb 5 at 20:19
  • $\begingroup$ That being said does it have to be a ContourPlot ? I'd rather have only a x-y axis instead of a box. Sorry if this is to much $\endgroup$ – CatoMaths Feb 5 at 20:25

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.