You are not logged in.
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
press enter?
His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.
Offline
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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