A not too nice equation.

SLAM: debunk creationism, pseudoscience, and superstitions. Discuss logic and morality.

Moderator: Alyrium Denryle

Post Reply
User avatar
Prozac the Robert
Jedi Master
Posts: 1327
Joined: 2004-05-05 09:01am
Location: UK

A not too nice equation.

Post by Prozac the Robert »

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.
Hi! I'm Prozac the Robert!

EBC: "We can categorically state that we will be releasing giant man-eating badgers into the area."
User avatar
Kuroneko
Jedi Council Member
Posts: 2469
Joined: 2003-03-13 03:10am
Location: Fréchet space
Contact:

Post by Kuroneko »

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.
User avatar
Melchior
Jedi Master
Posts: 1061
Joined: 2005-01-13 10:46am

Post by Melchior »

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.
Dark Sider
Fundamentalist Moron
Posts: 129
Joined: 2004-01-16 10:23pm

Post by Dark Sider »

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
Dark Sider
Fundamentalist Moron
Posts: 129
Joined: 2004-01-16 10:23pm

Post by Dark Sider »

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.
Isn't this wrong? You have S on both sides...shouldn't S be isolated?
I'm a fucktard and you can reach me at princessvenus2@juno.com
User avatar
Prozac the Robert
Jedi Master
Posts: 1327
Joined: 2004-05-05 09:01am
Location: UK

Post by Prozac the Robert »

Hey, cheers Kuroneko. I feel a bit silly now, (was too easily daunted by the mixed S&T term from the (S-T)^2), but now that you've said that I see quite clearly.
Hi! I'm Prozac the Robert!

EBC: "We can categorically state that we will be releasing giant man-eating badgers into the area."
User avatar
brianeyci
Emperor's Hand
Posts: 9815
Joined: 2004-09-26 05:36pm
Location: Toronto, Ontario

Post by brianeyci »

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
User avatar
Kuroneko
Jedi Council Member
Posts: 2469
Joined: 2003-03-13 03:10am
Location: Fréchet space
Contact:

Post by Kuroneko »

brianeyci wrote:=> T = a - bT + bS + cT^2 - 2STc + S^2c
=> cS^2 + (1 - 2Tc)S + (cT^2 + a - bT - T) = 0
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.
User avatar
brianeyci
Emperor's Hand
Posts: 9815
Joined: 2004-09-26 05:36pm
Location: Toronto, Ontario

Post by brianeyci »

Bah expansion of terms.

All I have to say is if I was doing that on paper than having to type in brackets and apostrophes, I would not have made that mistake :twisted:.

Brian
Post Reply