Math Is Fun Forum

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

You are not logged in.

#1 2014-09-23 17:50:00

HopeYouKnowWhoIam
Guest

Please tell me

Please tell me if Coefficient[Product[(x+i),{i,100}],x,99] is 5050 because no CAS is working here?! help!!!!

#2 2014-09-23 18:40:30

Bob
Administrator
Registered: 2010-06-20
Posts: 10,626

Re: Please tell me

hi HopeYouKnowWhoIam

Welcome to the forum.  I, for one, don't know who you are.  dizzy

I also don't follow your syntax.  What are you multiplying (x + i) by ?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2014-09-23 18:49:45

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Please tell me

Hi Bob

It's M syntax. I'll try to run it, he basically wants the x^99 term of

Last edited by anonimnystefy (2014-09-23 18:55:04)


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#4 2014-09-23 18:54:15

Bob
Administrator
Registered: 2010-06-20
Posts: 10,626

Re: Please tell me

hi Stefy,

Thanks, I did wonder if that was the sort of thing meant.

Now is that i the 'summation' variable Ie the same as n in your version ?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#5 2014-09-23 18:56:13

Bob
Administrator
Registered: 2010-06-20
Posts: 10,626

Re: Please tell me

What I mean is

is this (x+1)(x+2).....(x+100) or is it (x+i)^100 where i is a constant ?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#6 2014-09-23 18:56:48

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Please tell me

Yes, it is, I have edited it accordingly.

If I am not mistaken, the x^99 term should be


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#7 2014-09-23 19:00:34

Bob
Administrator
Registered: 2010-06-20
Posts: 10,626

Re: Please tell me

The x^99 term will be found by picking 99 brackets with x and one bracket with a number and then adding them up.  So the coefficient is

Who needs a CAS ?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#8 2014-09-23 19:06:45

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Please tell me

Ah, yes, that is correct. I was thinking of the x term.

Have you seen the thread that emerged? smile


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#9 2014-09-23 19:27:41

Bob
Administrator
Registered: 2010-06-20
Posts: 10,626

Re: Please tell me

Have you seen the thread that emerged?

?? Which thread ?

btw re-check your Latex in post 6.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#10 2014-09-23 19:33:55

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Please tell me

What's wrong with my LaTeX?

What's my line?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#11 2014-09-23 19:44:51

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Please tell me

Thank you, guys. It indeed is 5050. I did with combinatorics, I do not get the normal procedure anyway


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#12 2014-09-23 20:02:25

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Please tell me

Is this a Brilliant problem?


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#13 2014-09-23 20:13:58

Bob
Administrator
Registered: 2010-06-20
Posts: 10,626

Re: Please tell me

Stefy wrote:

What's wrong with my LaTeX?

This is what I'm seeing:

So what is 1/i when i = 0  ?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#14 2014-09-23 20:16:03

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Please tell me

It is not a Brilliant problem. But it will become one soon.

The next knows how


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#15 2014-09-23 20:19:32

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Please tell me

That's no a Latex problem, it's me not checking. It should go from i=1 and is the answer for the incorrect problem.

Yes, I know.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#16 2014-09-23 21:14:37

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Please tell me

Hi HopeYouKnowWhoIam;

I know who you are. Someone who ain't been reading my computer math thread.

Coefficient[Product[(x + i), {i, 100}] // Expand, x^99]

is 5050 because no CAS is working here

There ain't nuthin a CAS can not do.

Agnishom wrote:

It is not a Brilliant problem. But it will become one soon.

Hoooha, I can not wait.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#17 2014-09-23 21:42:25

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Please tell me

The command he posted works too:

Coefficient[Product[(x+i),{i,100}],x,99]

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#18 2014-09-23 21:47:09

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Please tell me

It does not work.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#19 2014-09-23 21:52:21

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Please tell me

In[1]:= Timing[Coefficient[Product[(x + i), {i, 100}], x, 99]]

Out[1]= {21.056764, 5050}

The OP is following your Computer Math thread. He could not get the CAS to work because he did not have it on the machine which he was using then.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#20 2014-09-23 21:54:32

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Please tell me

I repeat, that does not work. Efficiency counts.

AbsoluteTiming[Coefficient[Product[(x + i), {i, 100}], x, 99]]

AbsoluteTiming[Coefficient[Product[(x + i), {i, 100}] // Expand, x^99]]


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#21 2014-09-23 22:00:30

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Please tell me

bobbym wrote:

Mathematicians like simplicity. I like speed. Your solution is neither simple nor fast.


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#22 2014-09-23 22:03:30

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Please tell me

It is over 40 times faster than the OP's solution on my machine! Please run the code.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#23 2014-09-23 22:09:09

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Please tell me

In[2]:= AbsoluteTiming[Coefficient[Product[(x + i), {i, 100}], x, 99]]

Out[2]= {20.849901, 5050}

In[3]:= AbsoluteTiming[
 Coefficient[Product[(x + i), {i, 100}] // Expand, x^99]]

Out[3]= {0.008456, 5050}

In[5]:= %2/%3

Out[5]= {2466., 1}

Do you know why he could not get the CAS working?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#24 2014-09-23 22:12:08

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Please tell me

You seem to be agreeing with me... My solution is much faster and we can do better.

Do you know why he could not get the CAS working?

Who, what, when please.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#25 2014-09-23 22:32:26

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,996
Website

Re: Please tell me

Who

I am talking about the OP.

when

Today 11:20 Indian Standard Time

what

What what?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

Board footer

Powered by FluxBB