News:

Come Chat with us live! Learn how HERE!

Main Menu

The Math and Quiz Game =)

Started by NiTRoX, December 05, 2007, 05:47:11 PM

/dev/humancontroller

#90
a101 = 1 + 0.5*(14+24+...+1004) - 40*(13+23+...+1003) + (1+2+...+100) - 100*(1)

The formula for (1+2+...+n) is (n*(n+1)/2), for 100 that's 5050.
The formula for (13+23+...+1003) is ((n*(n+1)/2)2), for 100 that's 25502500.

a101 = 0.5*(14+24+...+1004) -1020095049

But I can't find the formula for (14+24+...+1004).
I'll google some more, or maybe you can tell me :]

TheEternalDretch

#91
Why google when you can figure these things out on your own? :D This problem (up to n9, I think) is one I played around with and found an answer to when I was 15 or 16. Of course, I was taking a very different approach, so I dunno.

I'd still like to see if someone can do it analytically. ^_^ Just one part left!

EDIT: Oh wow, I just found the general solution online. <3 Awesomeness. So never mind, I lost my curiosity in seeing how you'd do it. XD
14 + 24 +...+ n4 = (6n5 + 15n4 + 10n3 - n)/30

Your turn again!
Glory is eternal.

/dev/humancontroller

#92
P and T are static points in 3D.
P will throw something at T with a velocity of v.
The rock is affected by the gravity vector, G.
Where (direction: D) should P throw.. uhm, so that it hits T?

Overdose

Chocolate Milk.

TheEternalDretch

So, uh, is 'v' the starting velocity? And there's no friction?

Assuming that similarly to the previous problem, you're not causing any acceleration, then the only acceleration is caused by the force of gravity. I'm defining the Z axis as up.

a(t) = -G
V(t) = v - Gt
X(t) = Px + vxt, Y(t) = Py + vyt, Z(t) = Pz + vzt - Gt2/2

Assuming that we picked the right direction, there will be a time t0 for which our projectile hits the target. In that case,
X(t0) = Px + vxt0 = Tx
Y(t0) = Py + vyt0 = Ty
Z(t0) = Pz + vzt0 - Gt02/2 = Tz

Of course, we also know that vx2 + vy2 + vz2 = v2

That gives us four equations, four unknowns. We'd express t0 using v, and then find the different components of v, and thus the solution. I'd do it now, but I'd got other things to do. I'll probably get to it later.
Glory is eternal.

/dev/humancontroller

G is a vector that may or may not be pointing downwards.
Typically, it would be (0,0,-9.81), but that is not guaranteed (only that |G| > 0).
Note the conformation: the "positive direction" of the axes, the negative value in G.

TheEternalDretch

#96
Quote from: /dev/humancontroller on December 23, 2007, 09:58:33 AM
G is a vector that may or may not be pointing downwards.
Seeing as you put no limitations on the axes, I can simply define them so that G is indeed pointing downwards. And if that doesn't satisfy you, the four equations can easily be changed to:
X(t0) = Px + vxt0 - Gxt02/2 = Tx
Y(t0) = Py + vyt0 - Gyt02/2 = Ty
Z(t0) = Pz + vzt0 - Gzt02/2 = Tz
vx2 + vy2 + vz2 = v2
...which is the same story. And I'm still too lazy to go through the algebra. Maybe later.

EDIT: Okay, let's do this thing.
vx  = Gxt0/2 + (Tx - Px)/t0
vy  = Gyt0/2 + (Ty - Py)/t0
vz  = Gzt0/2 + (Tz - Pz)/t0
vx2 + vy2 + vz2 = (Gxt0/2 + (Tx - Px)/t0)2 + (Gyt0/2 + (Ty - Py)/t0)2 + (Gzt0/2 + (Tz - Pz)/t0)2 = v2
Gx2t02/4 + Gx(Tx - Px) + (Tx2 - 2TxPx + Px2)/t02 + Gy2t02/4 + Gy(Ty - Py) + (Ty2 - 2TyPy + Py2)/t02 + Gz2t02/4 + Gz(Tz - Pz) + (Tz2 - 2TzPz + Pz2)/t02 = v2
Multiply the equation by t02....
Gx2t04/4 + Gx(Tx - Px)t02 + Tx2 - 2TxPx + Px2 + Gy2t04/4 + Gy(Ty - Py)t02 + Ty2 - 2TyPy + Py2 + Gz2t04/4 + Gz(Tz - Pz)t02 + Tz2 - 2TzPz + Pz2 = v2t02
Some rearranging....
t04(Gx2 + Gy2 + Gz2)/4 + t02(Gx(Tx - Px) + Gy(Ty - Py) + Gz(Tz - Pz) - v2) + Tx2 - 2TxPx + Px2 + Ty2 - 2TyPy + Py2 + Tz2 - 2TzPz + Pz2 = 0
t04(GoG)/4 + t02(Go(T-P) - v2) + (T-P)o(T-P) = 0
t02 = v2 - Go(T-P) + √((Go(T-P) - v2)2 - (GoG)*(T-P)o(T-P)) *2/(GoG)
I'm gonna stick in L = T-P to get a cleaner formula....
t0 = √( v2 - GoL + √((GoL - v2)2 - (GoG)*(LoL)) *2/(GoG) )

Now that we have t0, we also have vx, vy and vz, and therefore
D = (vx/v, vy/v, vz/v) or D = Gt0/2v + L/vt0
Good enough? ^_^
Glory is eternal.


TheEternalDretch

Okay, I hope this one isn't too hard. Find a function f(x) (though general solutions are nice) for which:
f''(x)*cos(2x) + 4f(x)*cos(2x) = 1
Where f''(x) is the second derivative of f(x).

If this is too hard, I can switch it for something easier. Again, I just want to see the sort of response I'll get.
Glory is eternal.

kevlarman

Quote from: TheEternalDretch on December 24, 2007, 03:18:46 AM
Okay, I hope this one isn't too hard. Find a function f(x) (though general solutions are nice) for which:
f''(x)*cos(2x) + 4f(x)*cos(2x) = 1
Where f''(x) is the second derivative of f(x).

If this is too hard, I can switch it for something easier. Again, I just want to see the sort of response I'll get.
my calculus is a little on the rusty side to be solving second order differential equations right now, but my trusty 89 says (in LaTex to avoid a mess of parentheses): f(x) = \frac{cos(2x)*ln(abs(cos(2x)))}{4} + C_{1}*cos(2x) + (\frac{x}{2} + C_{2})*sin(2x) where C1 and C2 are any constants.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

khalsa

I dunno why, but reading latex is one of my pet peeves:

}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

TheEternalDretch

#101
That is very correct. o_o What is this trusty 89, eh, precious? What is it, eh?
Glory is eternal.

kevlarman

ti-89, the motorola 68K calculators from can solve many first and second order differential equations (but you have to be careful because they don't tell you when they are wrong, it's easy to check though, since they always give the correct answer when differentiating)
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

TheEternalDretch

Okay, then next time I should give a third order equation.  :P Calculators are for the weak, anyway.
Glory is eternal.

kevlarman

#104
MATLAB > 3rd order differential equations i think
a calculator is useless for this one (this is pretty unreadable but i'll let khalsa fix it up again):

det \left( \left[ \begin{array}{cccccc}
-3 & -3 & -5 & -4 & 6 & -6 \\
7 & -4 & 3 & 5 & 6 & -9 \\
-3 & 6 & -1 & -2 & -1 & -2 \\
9 & 9 & 4 & 2 & -6 & 2 \\
-1 & 2 & 9 & -8 & -6 & -3 \\
1 & -8 & -5 & -7 & 3 & 9
\end{array} \right] - \lambda I_{6} \right)
where lambda is any eigenvalue of that 6x6 matrix.
[edit] bonus question:
list all values of eigenvalues of the matrix, i will accept answers accurate to 32 bits or better[/edit]
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

khalsa

Why must you abuse my pet peeves?



Also, matlab solved this in under a second >_>

But I'll leave these ones for the plebs.


Khalsa
* khalsa tries to ignore this thread.
}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

TheEternalDretch

...this is just raw calculating. How boring. If I was going to solve this, I would also have used matlab, so khalsa might as well post the solution and give us a new problem. ^_^

(Since when can matlab solve differential equations? That's new to me. How do you do it?)
Glory is eternal.

khalsa

}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

kevlarman

if you think the original problem (not the bonus question) requires a lot of calculating then you aren't thinking hard enough
(also wtf partial differential equations have nothing to do with this)
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

TheEternalDretch

Quote from: kevlarman on December 25, 2007, 05:40:41 PM
if you think the original problem (not the bonus question) requires a lot of calculating then you aren't thinking hard enough
As far as I can currently tell, both problems require the same effort. So sure, I'm missing something. *shrug* Thanks, Khalsa.
Glory is eternal.

kevlarman

#110
hint: attempting to solve the second problem by hand should reveal a trivial solution to the first.
edit: in case i wasn't completely clear in my original post, i want the value of the whole expression, not what lambda has to be to satisfy the conditions (that's the bonus question)
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

khalsa

Just cause kevlarman was being an annoying brat:

Answer is:
0
Proof:
Quote
"the solutions to det(A - \lambda I)=0 are the eigenvalues of A" ;
"the eigenvalues of that matrix btw are roughly 1.355 and 16.982"

Khalsa

Edit: My actual proof was "I'm retarded"
}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

kevlarman

at least take the effort to copy the program i gave you into your 92 and give me eigenvalues to (almost) 64 bits.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

khalsa

Actually cause I'm a lazy bastard, let's just call your bonus question the question I pose for the people  8) .

It's easy as pie folks, finish it quick and shut kevlarman up.


Khalsa
}MG{ Mercenariesguild
ਮਨੁ ਜੀਤੇ ਜਗੁ ਜੀਤਿਆ

TheEternalDretch

....duh. >_< Way to forget what eigenvalues are, Eternal! For some reason, I thought you wanted the polynomial for an unknown lambda. Bah.

But I'm still not planning on doing that determinant by hand, since there would be 720 products. And I only have matlab at school.
Glory is eternal.

kevlarman

Quote from: TheEternalDretch on December 26, 2007, 06:51:02 PM
....duh. >_< Way to forget what eigenvalues are, Eternal! For some reason, I thought you wanted the polynomial for an unknown lambda. Bah.

But I'm still not planning on doing that determinant by hand, since there would be 720 products. And I only have matlab at school.
i chose a large matrix for a reason, most calculators (once again 89/92 are smarter than that) choose to calculate a determinant naively. doing this properly should take roughly 30 additions and 36 multiplications.
(the determinant of a triangular matrix is simply the product of the diagonal, swapping 2 rows negates the determinant, multiplying a row by 1/c will multiply the determinant by c, adding another row times a constant to a row does not change the determinant), the only difficulty is the 6th order polynomial that results from this (ti-89s can't find exact solutions unless the polynomial is trivial to factor).
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----