Math Is Fun Forum

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

You are not logged in.

#226 2014-12-13 04:50:03

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

Re: Teach David

Know how to enter multiple lines in the same cell?


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

#227 2014-12-13 04:56:09

David
Member
From: Bumpkinland
Registered: 2014-04-23
Posts: 3,164

Re: Teach David

press enter?


His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.

Offline

#228 2014-12-13 04:56:55

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

Re: Teach David

That is correct. Enter these two lines

f[11]
g[11]


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

#229 2014-12-13 04:58:28

David
Member
From: Bumpkinland
Registered: 2014-04-23
Posts: 3,164

Re: Teach David

121, g[11] is the output


His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.

Offline

#230 2014-12-13 05:03:40

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

Re: Teach David

What do you think happened, why was there not 121 twice?


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

#231 2014-12-13 05:06:48

David
Member
From: Bumpkinland
Registered: 2014-04-23
Posts: 3,164

Re: Teach David

Because of the missing _


His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.

Offline

#232 2014-12-13 05:10:05

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

Re: Teach David

n_ is a pattern. It says give the name n to whatever is being passed to the function.

On the other hand, f[n] reffers to n only. It only works when you pass n


'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

#233 2014-12-13 05:10:29

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

Re: Teach David

That is correct. It is called the slot operator. Try g[n] and see what you get.


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

#234 2014-12-13 05:32:56

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

Re: Teach David

It shoukd be n^2


'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

#235 2014-12-13 05:35:59

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

Re: Teach David

Yes, why?


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

#236 2014-12-13 05:42:34

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

Re: Teach David

Because it was defined to be n^2


'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

#237 2014-12-13 05:47:17

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

Re: Teach David

Why did not 11 become 121?


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

#238 2014-12-13 12:47:41

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

Re: Teach David

Because 11 is not n. The function is defined for n only.


'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

#239 2014-12-13 13:29:00

David
Member
From: Bumpkinland
Registered: 2014-04-23
Posts: 3,164

Re: Teach David

Sorry I fell asleep yesterday.


His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.

Offline

#240 2014-12-13 20:28:28

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

Re: Teach David

That is correct. So now define a function that cubes any number.


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

#241 2014-12-13 20:38:34

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

Re: Teach David

That is going to be hard

CubeMe[n_] := Times[n,Sum[(2 i + 1), {i, 0, n - 1}]]ž

'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

#242 2014-12-13 20:42:06

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

Re: Teach David

Hmmm, that is correct.


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

#243 2014-12-13 20:52:08

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

Re: Teach David

This does not work:

CubeMe[n_] := 
 Times[Sum[Sin[i]^2 + Cos[Times[i, E^(I \[Pi]) + 2]]^2, {i, n}], 
  Sum[(2 i + 1), {i, 0, n - 1}] ]

When I say

CubeMe[30]

It says weird things like

900 (Cos[1]^2 + Cos[2]^2 + Cos[3]^2 + Cos[4]^2 + Cos[5]^2 + Cos[6]^2 +
    Cos[7]^2 + Cos[8]^2 + Cos[9]^2 + Cos[10]^2 + Cos[11]^2 + 
   Cos[12]^2 + Cos[13]^2 + Cos[14]^2 + Cos[15]^2 + Cos[16]^2 + 
   Cos[17]^2 + Cos[18]^2 + Cos[19]^2 + Cos[20]^2 + Cos[21]^2 + 
   Cos[22]^2 + Cos[23]^2 + Cos[24]^2 + Cos[25]^2 + Cos[26]^2 + 
   Cos[27]^2 + Cos[28]^2 + Cos[29]^2 + Cos[30]^2 + Sin[1]^2 + 
   Sin[2]^2 + Sin[3]^2 + Sin[4]^2 + Sin[5]^2 + Sin[6]^2 + Sin[7]^2 + 
   Sin[8]^2 + Sin[9]^2 + Sin[10]^2 + Sin[11]^2 + Sin[12]^2 + 
   Sin[13]^2 + Sin[14]^2 + Sin[15]^2 + Sin[16]^2 + Sin[17]^2 + 
   Sin[18]^2 + Sin[19]^2 + Sin[20]^2 + Sin[21]^2 + Sin[22]^2 + 
   Sin[23]^2 + Sin[24]^2 + Sin[25]^2 + Sin[26]^2 + Sin[27]^2 + 
   Sin[28]^2 + Sin[29]^2 + Sin[30]^2)

'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

#244 2014-12-13 20:55:09

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

Re: Teach David

CubeMe[30]//FullSimplify
or
CubeMe[30]//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

#245 2014-12-13 20:56:15

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

Re: Teach David

27000


'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

#246 2014-12-13 20:57:09

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

Re: Teach David

That is correct.


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

#247 2014-12-13 21:01:14

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

Re: Teach David

Thanks, now I know how to cube a number


'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

#248 2014-12-13 21:02:19

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

Re: Teach David

Simpler seems f[n_]:=n^3


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

#249 2014-12-13 21:17:34

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

Re: Teach David

Wow! How did you discover that?


'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

#250 2014-12-13 21:27:33

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

Re: Teach David

It is a gift.


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