This might be a simple question for the most of you, but I am very new to mathematica so please bear with me. I'll refer to the code below:

H = 10
T0 = 3600
Cd = 0.0573*Sqrt[1 + 0.148*U0]
Iv = 0.06*(1 + 0.043*U0)*(z/10)^-0.22
Solve[Utz == U0*(1 + Cd*Log[z/H])*(1 - 0.41*Iv*Log[T/T0]) && U0 > 0, U0]

I would like to Solve the above formula for U0, so I get U0=... with Utz, z and T as the variables. I only need solutions >0. However, the notebook keeps 'running' when I use this. I have also used input values for Utz, z and T, this works fine and the correct value for U0 is provided.

Am I doing this correctly and does the Solve simply take a lot of time, or is there another explanation?

Thanks in advance,



Thanks Sjoerd for your comment. The problem lies in the fact that Cd and Iv are both defined by variables U0 and z. That is why I want to incorporate those in the Solve for U0, something like?:

Solve[Utz == U0*(1 + (0.0573*Sqrt[1 + 0.148*U0])*Log[z/H])*(1 - 0.41*(0.06*(1 + 0.043*U0)*(z/10)^-0.22)*Log[T/T0]) && U0 > 0 && T > 0 && z/H > 0, U0]

However, again this results in 'running' process.


In this case, it helps if you leave your parameters undefined (Solve doesn't like the inexact quantities you use) and add some assumptions.

So, let's first clear your variables

H =.; T0 =.; Cd =.; Iv =.


Solve[Utz == U0*(1 + Cd*Log[z/H])*(1 - 41/100*Iv*Log[T/T0]) && 
      U0 > 0 && T > 0 && z/H > 0, U0, Reals]

Note that I also changed the 0.41 to 41/100

Almost instantaneously, this gives you a long conditional expression which I show shortened below:

{{U0 -> ConditionalExpression[-((100*Utz)/(-100 + 41*Iv*Log[T/T0] - 100*Cd*Log[z/H] + 41*Cd*Iv*Log[T/T0]*Log[z/H])), << 1 >> ]}}

You can now fill in the values for the parameters.


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.