## 15 Reputation

0 years, 237 days

## @mmcdara  If I take a step back, i...

If I take a step back, is it possbile to solve these 2 equations analytically for X, Y, treating all other terms as parameters?

```f := (X, Y) -> -(T1 - X)/Rthhot + (X - Y)/Rth + S^2*X*(X - Y)/(R + Rload) + (-1)*0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2;

g := (X, Y) -> (Y - T2)/Rthcold - (X - Y)/Rth - S^2*Y*(X - Y)/(R + Rload) + (-1)*0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2;```

## Thank you very much for your help!...

Thank you very much for your help!

## Maybe I posed the question incorrectly...

@mmcdara

Maybe I posed the question incorrectly.  The real variables in this problem is Rolad and Rth.

X and Y are functions of Rload and Rth given by the 2 equations:

```0=-(T1 - X)/Rthhot + (X - Y)/Rth + S^2*X*(X - Y)/(R + Rload) + (-1)*0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2

0=(Y - T2)/Rthcold - (X - Y)/Rth - S^2*Y*(X - Y)/(R + Rload) + (-1)*0.5*S^2*Rload*(X - Y)^2/(R + Rload)^2;```

and S is a function of Rth  is given by

`0=S^2*Rth/R - Z`

then we are trying to maximize power as a function of Rload and Rth

`Power=S^2*(X - Y)^2*Rload/(R + Rload)^2;`

So, fundamentally there are only 2 variables: Rth and Rload.  Can you see if it's still a saddle point if we look at it this way?  When I vary Rth and Rload numerically, it seems the solution is a maximum.

By the way, when I tried to run your code, I got some errors:

mmcdara-onstrained_maximization_3.pdf

## Here is an example...

That's right, the variables are X, Y, Rload, Rth, S,  and Rth does not directly enter the expression for power, it enters through the constraint equations.

Here is an example:  given  T1 = 310 ,  T2 = 300 , Rthhot = 0.1 , Rthcold = 6,   R = 6 , Z=1/305

The solution I found using Mathematica's FindMaximum or Lgarange multiplier methods is:

Power=0.00230234, X=309.918, Y =304.91, Rload=8.48585, Rth= 8.66666, S= 0.0476431

I checked other solutions near this point, it seems to be the maximum.

## I've done numerical calculations...

Thanks for your heip, but if I assign numerical values to T1, T2, R, Rthhot, Rthcold, and Z, I can solve this problem and get good solutions.