Math Is Fun Forum

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

You are not logged in.

#1 2013-11-18 08:48:53

ShivamS
Member
Registered: 2011-02-07
Posts: 3,648

Mathematica - proving something

How do I prove


using Mathematica 9?
Is an inductive proof even possible in Mathematica?

Last edited by ShivamS (2013-11-18 08:49:44)

Offline

#2 2013-11-18 09:03:01

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

Re: Mathematica - proving something

Hi;

Mathematica already knows that is true but to do the steps

For the base case.

1^2==(n*(n + 1) (2 n + 1))/6 /.n->1

True



For the inductive step:

If that is true then

ought to be true. Subtract 1). from 2).

((n*(n + 1) (2 n + 1))/6 /. n -> n + 1) - (n*(n + 1) (2 n + 1))/6 // FullSimplify

(n+1)^2

The LHS is obviously (n+1)^2 so we are done.


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

#3 2013-11-18 09:09:10

ShivamS
Member
Registered: 2011-02-07
Posts: 3,648

Re: Mathematica - proving something

The first statement doesn't compute properly...

Offline

#4 2013-11-18 09:10:07

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

Re: Mathematica - proving something

Hi;

Change the = to ==, I am sorry.


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

#5 2013-11-18 09:12:33

ShivamS
Member
Registered: 2011-02-07
Posts: 3,648

Re: Mathematica - proving something

Ok, thanks.

Offline

#6 2013-11-18 09:14:34

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

Re: Mathematica - proving something

Hi;

I have made lots of changes to post #2.

Mathematica knows that sum:

Sum[k^2, {k, 1, n}]

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

#7 2013-11-18 09:46:06

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

Re: Mathematica - proving something

Sum[...,{i,1,n}]

seems to be a bit faster than

Sum[...,{i,n}]

Why's that?


“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

#8 2013-11-18 10:02:01

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

Re: Mathematica - proving something

I guess because he needs time to figure the lower index.


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

#9 2013-11-18 10:06:55

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

Re: Mathematica - proving something

But, it's an 0.03s difference.

Last edited by anonimnystefy (2013-11-18 10:07:16)


“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

#10 2013-11-18 10:10:49

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

Re: Mathematica - proving something

If it is not granularity, then that is probably the amount of time it would take.


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

#11 2013-11-18 11:32:33

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

Re: Mathematica - proving something

Granularity?


“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

#12 2013-11-18 11:40:26

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

Re: Mathematica - proving something

Trying to measure a very small increment with a large measuring stick produces granularity.


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

#13 2013-11-18 12:16:08

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

Re: Mathematica - proving something

How does that happen in M. Do you have an example?


“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

#14 2013-11-18 22:10:49

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

Re: Mathematica - proving something

I do not think I can.  If you only have a 3 ft. stick and you and I both try to measure on inch, the measurements will vary greatly.


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

#15 2013-11-18 22:12:16

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

Re: Mathematica - proving something

I do not think that is the 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

#16 2013-11-18 22:19:46

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

Re: Mathematica - proving something

Then I would go with the fact that it has to make one more decision.


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 2013-12-09 13:58:12

ShivamS
Member
Registered: 2011-02-07
Posts: 3,648

Re: Mathematica - proving something

Thanks for fixing it.

Offline

#18 2013-12-09 21:47:29

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

Re: Mathematica - proving something

Hi;

You are welcome.


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

Board footer

Powered by FluxBB