A not too nice equation.
Moderator: Alyrium Denryle
- Prozac the Robert
- Jedi Master
- Posts: 1327
- Joined: 2004-05-05 09:01am
- Location: UK
A not too nice equation.
I need a little help.
I've agreed to look at this equation:
T=a-b(T-S)+c(T-S)^2
for a friend, but I'm not entirely sure what to do with it.
He's trying to get S in terms of T. (Normally, S & T are known, and one of the other things is the thing to be determined.)
I realise I need an approximate solution, but it's been quite a while since I've done anything with numerical methods (I realise I haven't given any numbers, what I want is a way to set the problem up that I can email to my friend and have him do the rest).
Any available hints would be welcome.
I've agreed to look at this equation:
T=a-b(T-S)+c(T-S)^2
for a friend, but I'm not entirely sure what to do with it.
He's trying to get S in terms of T. (Normally, S & T are known, and one of the other things is the thing to be determined.)
I realise I need an approximate solution, but it's been quite a while since I've done anything with numerical methods (I realise I haven't given any numbers, what I want is a way to set the problem up that I can email to my friend and have him do the rest).
Any available hints would be welcome.
Hi! I'm Prozac the Robert!
EBC: "We can categorically state that we will be releasing giant man-eating badgers into the area."
EBC: "We can categorically state that we will be releasing giant man-eating badgers into the area."
-
- Fundamentalist Moron
- Posts: 129
- Joined: 2004-01-16 10:23pm
Kuroneko wrote:After expanding all of the terms, it is easily seen as an ordinary quadratic equation in S: [c]S² + [b-2cT]S + [cT²-(b+1)T+a] = 0, to which one can apply the qudratic formula to obtain the solution.
Well....sonofabitch. I am good at algebra, but not this good. I would have never thought of that. I wish I majored in mathematics in order to look at equations in this manner.
I'm a fucktard and you can reach me at princessvenus2@juno.com
-
- Fundamentalist Moron
- Posts: 129
- Joined: 2004-01-16 10:23pm
Isn't this wrong? You have S on both sides...shouldn't S be isolated?Melchior wrote:T= a - bT + bS + c(T^2 - 2ts + S^2)
T= a - bT + bS + cT^2 - 2cTS + cS^2
-bS+2cTS-cS^2=a-bT-T
S(-b+2cT-cS)=a-bT-T
S=(a-bT-T)/(-b+2cT-cS)
Take it with a grain of salt, I am quite rusty in these things.
I'm a fucktard and you can reach me at princessvenus2@juno.com
- Prozac the Robert
- Jedi Master
- Posts: 1327
- Joined: 2004-05-05 09:01am
- Location: UK
S in terms of T is writing S equal to some combination of T's. So having S's on both sides (Melchior's solution) means you are not giving what they want. You have to do what Kurenoko suggested.
T = a - b(T - S) + c(T - S)^2
=> T = a - bT + bS + c(T^2 -2ST + S^2)
=> T = a - bT + bS + cT^2 - 2STc + S^2c
=> cS^2 + (1 - 2Tc)S + (cT^2 + a - bT - T) = 0
Let a = c, b = (1 - 2 Tc), and c1 = (cT^2 + a - bT - T).
=> aS^2 + bS + c1 = 0
Use the quadratic formula to obtain two answers for S.
=> (- b (+-) sqrt(b^2 - 4(a)(c1))/2(a)
Substitute. Two answers for S in terms of T.
Brian
T = a - b(T - S) + c(T - S)^2
=> T = a - bT + bS + c(T^2 -2ST + S^2)
=> T = a - bT + bS + cT^2 - 2STc + S^2c
=> cS^2 + (1 - 2Tc)S + (cT^2 + a - bT - T) = 0
Let a = c, b = (1 - 2 Tc), and c1 = (cT^2 + a - bT - T).
=> aS^2 + bS + c1 = 0
Use the quadratic formula to obtain two answers for S.
=> (- b (+-) sqrt(b^2 - 4(a)(c1))/2(a)
Substitute. Two answers for S in terms of T.
Brian
- Kuroneko
- Jedi Council Member
- Posts: 2469
- Joined: 2003-03-13 03:10am
- Location: Fréchet space
- Contact:
The 1-2Tc coefficient should be b-2Tc, Mr. Eyci. Corresponding terms bolded above. It is also generally a bad idea to use the same letter names, but that is easily fixed with A = c, B = b-2cT and C = cT^2 + a - bT - T, thus having AS² + BS + C = 0. Same idea, but without the the ambiguity as to which a or b one is referring to.brianeyci wrote:=> T = a - bT + bS + cT^2 - 2STc + S^2c
=> cS^2 + (1 - 2Tc)S + (cT^2 + a - bT - T) = 0