Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#76 Re: Help Me ! » line intersection » 2009-03-23 09:12:58

safra wrote:

Many thanks luca-deltodesco. I read your reply this morning and did a quick test. It didn't work but I have to do more tests. I just wanted to say thanks a lot for your big post.

i took a quick look and i made a few typos when doing it (I did it in a hurry) I've corrected them now


safra wrote:

Just to be sure,  I have never seen this operator  ~=~

Is it like !=   
?

it's just to mean approximately equal to, since you should never use == and != with floating point numbers in such an application as rounding errors can occur.


---

Gutsnik's method, whilst valid is far more convoluted than my own involving far more computation.

#77 Re: Help Me ! » line intersection » 2009-03-22 07:51:06

I think you mean putting the lines into the form y = mx + c, i would suggest against this as it will not deal with vertical lines for a start.
There is an easier way working with lines parametrically as rays.

You 'can' solve for s and t in this manner, but it is quite messy.
It easier to think about it another way:

If you take the vector from one of the starting points 'a' or 'c', to the intersection point, that vector will be parallel to the corresponding starting point, so if the intersection point is f, then (f-a) is parallel to v, and (f-c) is parallel to q
to know if two vectors are parallel, we take the dot product and if they are paralell the dot product will be equal to (plus/minus) the length of the two vectors multiplied together. However, we can think of this another way again, and by rotating (f-a) and (f-c) by 90 degrees, we can instead check that the perpendicular vector to (f-a) is perpendicular to v, and the perpendicular vector to (f-c) is perpendicular to q, this is easier to do since to check if two vectors are perpendicular we are only checking if their dot product is 0.

All that remains to test whether the two line segements intersect is to check that both s and t are betweeen 0 and 1, and if both of them are, then you can find the point of intersection by plugging either s or t into their respective ray equations for the lines

The equations have been set out so that the least amount of computation is needed, so to calculate s,t i would have:

// a {x,y}, b {x,y}, c {x,y}, d {x,y}
\\ v {}, q {}
\\ amc {}, denom, s, t

v.x = b.x-a.x;
v.y = b.y-a.y;
q.x = d.x-c.x;
q.y = d.y-c.y;

denom = v.y*q.x - v.x*q.y;
if(denom ~=~ 0) { /*no intersection, or the lines are colinear*/ return; }
denom = 1/denom;

amc.x = c.x-a.x;
amc.y = c.y-a.y;

t = (amc.y*q.x - amc.x*q.y)*denom;
if( t < 0 || t > 1 ) { /*no intersection*/ return; }

s = (amc.y*v.x - amc.x*v.y)*denom;
if( s < 0 || s > 1 ) { /*no intersection*/ return; }

/*intersection*/ return {a.x + t*v.x, a.y + t*v.y }

#78 Re: This is Cool » 0. the number of mystery and emptyness » 2009-03-17 20:34:34

the solution to xy = 0, is that there is no solution; only a partial solution that atleast one of x and y is 0, you can say nothing about both of them together.

#79 Re: This is Cool » 0.9999....(recurring) = 1? » 2009-03-17 20:31:03

MrRHQ wrote:

7/9 = 0.7777777777777.....................8
8/9 = 0.8888888888888.....................9
9/9 = 1

How can you call this logical? the elipses are a notation used to denote that there are an infinite number of the preceeding digit in this case, you can not put anything after this: You say there is an 8 after the end of the infinite number of 7's? That makes no sense, because placing an 8 at any point along the length of 7's would be to give the number of 7's a finite value, and the number of 7's would no longer be infinite.

MrRHQ wrote:

This would be as illogical as saying 999,999,999,999,999,999,999,999,999,999,999,999,999 = 1,000,000,000,000,000,000,000,000,000,000,000,000,000.

No, the comparison you should be making if you want to make such a silly comparison; is that

999999999999...9999.0 = 10^infinity = infinity, aka an infinite number of 9's preceeding the decimal point is equal to infinity; which is by definition infinity anyways and therefore true, since that length of 9's is infinitely long, it is infinite big, and therefore equal to infinity.

Nothing in the wikipedia article agrees with you; beyond that 0.999... = 1, which is something we (bar george) agree with anyways.

#80 Re: Help Me ! » Complex Numbers » 2009-03-17 20:23:55

do you mean:

in which case, remember that r.cisθ is one way of writing a complex number in polar form, such that it's a point 'r' distance from the origin at an angle θ counterclockwise to the x-axis

multiplying by i is the same as rotating that point a further 90 degrees about the x-axis, in otherwords:
ir.cisθ gives you a point on the argand diagram 'r' units from the origin, at an angle (θ+½π)rad or (θ+90°)degrees counterclockwise from the x-axis.

To see this note that you can see this by remembering that i is at 90 degrees = ½π radians from x-axis counterclockwise, so writing in exponential form you can write the expression as:

#81 Re: Help Me ! » rearrage formula » 2009-03-17 10:28:05

do you mean:

or

: eitherway just remember that you can multiply and divide both sides like normal so:


if you mean the first one:







or second one:





#82 Re: Help Me ! » help me!!! » 2009-03-17 08:55:30

a cubic number is a number given by n³ where n is a positive integer, aka. 1,8,27,64 etc

i've not heard of a quadrat number, do you maybe mean quadratic? in which case that is something very different, perhaps you mean a square number which would be generated by n², aka 1,4,9,16 etc

#83 Re: Help Me ! » putting fractions in order » 2009-03-16 11:33:57

to put them in order, make them all into single fractions with the same denominator, so in your example:



from which you can now easily put them in order

#84 Re: Help Me ! » related rates » 2009-03-15 02:59:55



Substitute values for r and h

#85 Re: This is Cool » Simple game » 2009-03-11 08:13:30

Or, since you didn't specify precisely what we could us.

Let's use the natural numbers under mod 12
9+10+11 = 6

tongue

#86 Re: Help Me ! » min{a,b} and max{a,b} » 2009-03-09 19:56:00

JaneFairfax wrote:

They would be useful in, for example, part of a computer program where you need to extract the max/min of two numbers. Instead of branching off into if-then-else subroutines, you can easily plug in those formulas directly into the equations you are using in your program.

which saves you even more trouble with if-then-else.

I would argue against that since in most languages you would be able to do something such as:

c = a<b ? a : b;
or
d = a<b&&a<c ? a : b<c ? b : c;

instead of if/else, if/elseif/else

of which both using the conditional operator, and normal branching will be alot faster in terms of execution than using the formula:

The only time that i can see these formula being of use in a programming application is in GPU programming on slightly older architectures where either branching is not supported, or branching is very slow and using the formula could execute faster.

#87 Re: This is Cool » Simple game » 2009-03-08 00:27:20

Jane's numbers DO satisfy that constraint.

#88 Re: This is Cool » Simple game » 2009-03-07 22:17:41

Jane, i don't think 6!!!! was meant to be factorial 4 times of 6, but that the ! were just for emphasis tongue

#89 Re: Help Me ! » Asymptotes » 2009-03-07 22:13:43

a)
asymptotes of

are at

the transformation on x is a scaling by 3, then a displacement by -pi/3, which doing the opposite way round is a displacement by pi/3, then a scaling by a 1/3
so the asymptotes are at

which in the region given gives:

b) solving it:




which as before gives:

#90 Re: Help Me ! » How do I work out Density?? » 2009-03-01 06:00:24

Density is mass per unit volume, so you need to know the volume of the prism which is given by

60x24 = 1440cm³

the density is then

648/1440 = 0.45 gcm-¹

#92 Re: This is Cool » 0.9999....(recurring) = 1? » 2009-02-26 08:50:26

vbjanine11 wrote:

But 9/9 also = 1. So, (using substitution) 9/9 = .9999… becomes 1 = .9999…

George's argument would be that none of these equalities are correct because neither 0.111... nor 0.333.. exist as they are continously growing. Yes, growing tongue.

Anyways yeh, i have no idea what to add; my stomach hurts so i'm going to sleep lol.

#94 Re: Help Me ! » how does e=lim_{x->0}(1+x)^{1/x}? » 2009-02-26 06:32:15

The Mclaurin series (Taylor series about x = 0) for exponentinal function is:



which ofcourse you can work backwards from:

Mclaurin series is formed by:

if:


then;

#95 Re: Help Me ! » natural numbers. » 2009-02-26 00:36:56

Are you thinking of:

which can be rearranged to give:

or how to prove that those are true?

To prove it in the second form (Since that's the one you showed in your post)

#96 Re: Help Me ! » I want to get the length of a parabola » 2009-02-24 22:39:52

That integral 'does' have an analytic solution: Observe:

To make things simpler: replace the constants with a,b

now substitute

now substitute


substitute back one step

back another step:

In thise case:
a = 0.096
b = 0.24


#97 Re: Help Me ! » Find missing term 4 , 9 , 34 , - , 3136 » 2009-02-24 02:00:56

Jane, 827 is not given as one of the possible answers so whilst your solution may work (I havn't tested it) It can't be the correct solution.

#98 Re: Dark Discussions at Cafe Infinity » Jade Goody - Months to life! » 2009-02-23 10:51:24

Jade Goody. WHO THE HELL CARES?! How rich is she? For what? Being an idiot on a math tv show, she doesn't even pay for her wedding, she has it payed for her by wellwishers, and then signs a 1 and a half million deal to have it filmed? Urgh, i wish she would just die already so i wouldn't have to ever read about her again.

#99 Re: Help Me ! » cosine inverse of a number>1 » 2009-02-12 20:48:16

The result will indeed be complex, both inverse sine, and inverse cosine can be expanded to all real numbers:

Board footer

Powered by FluxBB