Message Boards Message Boards

0
|
2878 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Solve does not produce a result for a system of equations.

Posted 3 years ago

I have defined a function as:

Clear["Global`*"]; Clear[Derivative];
D1[Q_, T_, D0_, k_] = D0*Exp[-Q/(k*T)];

This code produces a result when trying to find the parameters D0 and Q given the value of D1 at two values of T. k is a fixed parameter.

EQ1 = D1[Q, 650 + 273.15, D0, 9.62*10^-5] == 5.5*10^-16;
Temp = Solve[{EQ1}, {Q}];
EQ2 = D1[Q /. Temp[[1]], 900 + 273.15, D0, 9.62*10^-5] == 1.3*10^-13;
SolD0 = Solve[EQ2]
EQ3 = D1[Q, 650 + 273.15, D0 /. SolD0[[1]], 9.62*10^-5] == 5.5*10^-16;
Solve[EQ3]

Output:

{{D0 -> 0.0000756184}}

and

{{Q -> 2.27762}}

Trying to solve the equations as a set produces no result. Note I tried both Solve and NSolve.

Solve[{D1[Q, 650 + 273.15, D0, 9.62*10^-5] == 5.5*10^-16, 
  D1[Q, 900 + 273.15, D0, 9.62*10^-5] == 1.3*10^-13}, {Q, D0}]
NSolve[{D1[Q, 650 + 273.15, D0, 9.62*10^-5] == 5.5*10^-16, 
  D1[Q, 900 + 273.15, D0, 9.62*10^-5] == 1.3*10^-13}, {D0, Q}]

Output:

{{D0 -> 0.}}

and

{{D0 -> 0.}}

D0=0 is not a solution to these equations.

I do get the warning Solve: Equations may not give solutions to all "solve" variables. from both the Solve and NSolve functions.

Any ideas what is going on and what I need to do to Solve the equations as a simultaneous set?

POSTED BY: Edward Davis
2 Replies

Note I misstyped the example that was giving me an issue. The equations are indeed different, and the call to Solve should be:

Solve[{D1[Q, 650 + 273.15, D0, 9.62*10^-5] == 5.5*10^-16, 
  D1[Q, 900 + 273.15, D0, 9.62*10^-5] == 1.3*10^-13}, {Q, D0}]

This results in the same issue.

POSTED BY: Edward Davis

I found a work around.

Solve[{Log[D1[Q, 900 + 273.15, D0, 9.62*10^-5]] == Log[1.3*10^-13], 
  Log[D1[Q, 650 + 273.15, D0, 9.62*10^-5]] == Log[5.5*10^-16]}]

Output is correct:

{{D0 -> 0.0000756184, Q -> 2.27762}}

I would really like an explanation of why this works if anyone knows.

POSTED BY: Edward Davis
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract