I have the following equation that I want to solve with respect to a :
x = (ab-c+d)/log((ab)/(cd))
where x , b , c and d known. I used Wolfram Alpha to solve the equation, and the result:
a = bx*W(-((cd)*exp(d/xc/x))/x)
where W is the product logarithm function (Lambert function W). It might be easier to see it on the Wolfram Alpha page .
I used the built-in Matlab lambertW function to solve the equation. This is pretty slow and this is the bottleneck in my script. Is there another quicker way to do this? It does not have to be accurate to a decimal place.
EDIT: I had no idea this equation is so hard to solve. Here is an image illustrating my problem. Temperatures bd plus LMTD vary at each time step, but are known. Heat is transferred from the red line (CO2) to the blue line (water). I need to find the temperature "a". I did not know that it was so difficult to calculate!: P 
matlab logarithm natural-logarithm wolframalpha
Rofl
source share