Re: Maths Equation Problem
Quote:
Originally Posted by mtwh1
...I am trying to get it so the subject is P2 instead of H....
Welcome to the forums.
I think it's not possible. If n is plugged into the first equation, you end up having P2 and log(P2) in the same eq.
Of course, you can still calculate P2 if that's what you want to do, but you'll have to apply numerical methods.
Re: Maths Equation Problem
It's 6:30am so please, please double check my algebra if you're using this for anything important. Also, this is mostly scratch work:
log[P2*T1/(P1*T2)] (P2/P1) = n ;; meaning log[base] (argument)
(P2*T1/(P1*T2))^n = P2/P1
(P2/P1)^n*(T1/T2)^n = P2/P1
(P2/P1)^(n-1) = (T2/T1)^n
(P2/P1)^((n-1)/n)-1) = (P2/P1)^((n-1)/n)/[P2/P1]
= ((P2/P1)^(n-1))^(1/n)*P1/P2
= ((T2/T1)^n)^(1/n)*P1/P2
= T2/T1*P1/P2
H = R*Z*T1*T2/T1*P1/P2
= R*Z*T2*P1/P2
P2 = R*Z*T2*P1/H
Of course this assumes that the relevant functions are defined at the relevant values, that H is non-zero, etc.
It seems like the entire equation was meant to collapse down nicely, like the entire nonsense with the n was just thrown in to confuse you.
I hope I did all that right, though it seems like I probably did seeing how much everything simplifies.
Edit: And krtxmrtz would definately be right about the numerical methods thing if the base of the logarithm was constant, but it instead varies with the argument, and it seems like the base was chosen exactly so that everything would simplify.
Re: Maths Equation Problem
Quote:
Originally Posted by jemidiah
It's 6:30am so please, please double check my algebra if you're using this for anything important. Also, this is mostly scratch work:
log[P2*T1/(P1*T2)] (P2/P1) = n ;; meaning log[base] (argument)
(P2*T1/(P1*T2))^n = P2/P1
(P2/P1)^n*(T1/T2)^n = P2/P1
(P2/P1)^(n-1) = (T2/T1)^n
(P2/P1)^((n-1)/n)-1) = (P2/P1)^((n-1)/n)/[P2/P1]
= ((P2/P1)^(n-1))^(1/n)*P1/P2
= ((T2/T1)^n)^(1/n)*P1/P2
= T2/T1*P1/P2
Am I missing something or have you forgotten about the term (n/(n-1)) ?
Quote:
Originally Posted by jemidiah
H = R*Z*T1*T2/T1*P1/P2
= R*Z*T2*P1/P2
P2 = R*Z*T2*P1/H
...
Re: Maths Equation Problem
excellent, thanks very much Jemidiah. It seems you know your Logs alot better than me.
Thanks again,
Matt
Re: Maths Equation Problem
Seems i posted my thanks too quickly..
alot better than i can do anyways
Re: Maths Equation Problem
Yup, I plum forgot about the n/(n-1) term, which was the problem that krtxmrtz was talking about in the first place.
So it turns out that (barring any more algebra mistakes, which is kinda a big "if"):
H=R*Z*log[T2/T1](P2/P1)*T2*P1/P2
This was arrived at after a ridiculous amount of simplifying, which you can kinda follow in my scratch work below.
Like krtxmrtz said, it ends up being impossible to solve for P2 algebraically since the equation is in essence of the form x=log(x) [x->P1/P2], which cannot be solved normally with algebra. However, a numerical method as simple as Newton-Raphson (http://en.wikipedia.org/wiki/Newton's_method) would work, especially since the derivative in the final form is easy to calculate.
Sorry!
<Scratch Work>
H=R*Z*T1*(n/(n-1))*(P2/P1)^((n-1)/n)-1)
n=(log(P2/P1))/(log(P2/P1)-log(T2/T1))
=(log(P2/P1))/(log(P2*T1/(P1*T2)))
=log(P2/P1)/log(b) where b=P2*T1/(P1*T2)
=log[b](P2/P1)
n/(n-1); e = n-1, n=e+1; n/(n-1) = (e+1)/e = 1 + 1/e = 1 + 1/(n-1)
1/log[10](a) = log[10](10)/log[10](a) = log[a](10) since 1 = log[10](10)
or
1/log[b](a) = log[a](b) since 1 = log[b](b)
1/(n-1) = 1/(log[b](P2/P1) - 1)
=1/(log[b](P2/P1) - log[b](b))
=1/(log[b](P2/(P1*b)))
P2/(P1*b) = P2/(P1*P2*T1)*P1*T2
=T2/T1 [whew]
1/(n-1) = 1/(log[b](P2/(P1*b)))
=1/(log[b](T2/T1))
=log[T2/T1](b)
So, n/(n-1) = 1 + log[T2/T1](b)
=log[T2/T1](b*T2/T1)
b*T2/T1 = P2*T1/(P1*T2)*T2/T1 = P2/P1
Then n/(n-1) = log[T2/T1](P2/P1)
(P2*T1)/(P1*T2)^n = P2/P1
(P2/P1)^(n-1) = (T2/T1)^n
(P2/P1)^((n-1)/n)-1) = ((P2/P1)^(n-1))^(1/n)*(P2/P1)^(-1) = ((T2/T1)^n)^(1/n)*P1/P2 = (T2*P1)/(T1*P2)
H=R*Z*T1*(n/(n-1))*(P2/P1)^((n-1)/n)-1)
=R*Z*T1*(n/(n-1))*(T2*P1)/(T1*P2)
=R*Z*n/(n-1)*T2*P1/P2
=R*Z*log[T2/T1](P2/P1)*T2*P1/P2