a boring but necessary syntax question

jessica j

New member
Joined
May 16, 2009
Messages
5
When using the TI-89 to get the sum of a sequence you'd type in: sum(seq(x^2, x, 1, 1.5, .1)) for 1^2+1.1^2+1.2^2+1.3^2+1.4^2+1.5^2
How would you write this for Mathematica?
 
Actually, what I require, galactus, is a little different. I want the sum of a sequence with increments other than integer-sized. In going through the massive Mathematica manual I had already come across what you referred me to in your link,i.e. summing sequences involving integer steps. But there was no obvious section dealing with what I desire. I actually electronically searched the entire ebook of instructions for Mathematica with the search term "sum of a sequence" but got no results. Then I did a google search of "sum of a sequence" to see if there was another, more common way of expressing the procedure but I found nothing there either. Then, having exhausted all reasonable resources, I turned to this web site.
 
Actually, it's very easy. Type it in the same way as the previous except tack the .1 on the end.

Table[x^2,{x,1,1.5,.1}]

I did and just got: 1, 1.21, 1.44, 1.69, 1.96, 2.25

If you want them in fractions, type in 3/2 and 1/10 instead of 1.5 and .1

I get {1, 121/100, 36/25, 169/100, 49/25, 9/4} from Mathematica.
 
Actually, galactus, I was using the new WolframAlpha (just introduced to the world), which of course utilizes Mathematica for its calculations. (I don't have Mathematica itself.) Interestingly, when I pasted your instructions there, it threw up its hands and couldn't proceed, claiming it didn't understand the input. Evidently Stephen doesn't want to make the free WolframAlpha TOO useful.

Incidentally, your command “table” only provided a sequence. I wanted the sum of a sequence, in one fell swoop. Out of curiosity, how would you do that with Mathematica (though obviously WolframAlpha would feign ignorance there too)? Perhaps, SumTable? But wouldn't it be amusing, and actually incredible, if that poor, retarded child TI-89 were able to do something the Great Mathematica couldn't?
 
If you want the sum, you can do it this way in mathematica.

You can step-size a sum in mathematica. Make sure the S in sum is capital. That tricked me for a while.

Sum[x^2,{x,1,3/2,1/10}]

This gives 191/20, which is the sum of the entries.

Remember what we had before. {1, 121/100, 36/25, 169/100, 49/25, 9/4}=191/20

This is what you need, I believe.
 
Ave galactus! (Check your Latin dictionary), for your diligence in pursuing this matter.

And, quite coincidentally, just last Tuesday I was humiliated when I caught my mother using that Karnaugh Map, til I wised her up.
 
jessica j said:
And, quite coincidentally, just last Tuesday I was humiliated when I caught my mother using that Karnaugh Map, til I wised her up.

Hail thee Jessica -- are you sure your mama was using Karnaugh Map - and not Carnot's cycle (to optimize the efficiency of her "little GTO").

If she was really using Karnaugh Map - she might be messing with digital circuits - watch out!!!
 
Question, SK. What exactly are those things in my signature?. I put it there because it was comical and abstract humor.

What is the Quine-McCloskey algorithm and Karnaugh Map?. I have not used them, though, I have used various algorithms for optimization: genetic, traveling salesman problem, Ford-Fulkerson, Djikstra, etc. There are many of these algorithms if one looks around.
 
I worked ith Karnaugh maps in one of my undergraduate CS classes. It is used to take a complicated logical statement and simplify it to something usually smaller/easier. We used them for making circuits. By now, I've forgotten how to even start one.
 
Thanks, daon. I will have to google them. Especially, the QM algorithm.
 
Subhotosh, I suspect a secret past where you put down your equations, picked up your air guitar, and briefly became Ronnie (or at least one of the lesser Daytonas)! And then probably recreated the whole performance in a Fourier series!!

By the way, I find your von Neumann quote very intriguing. Do you think it might have applications outside math? For instance, classical mechanics "makes sense" while quantum mechanics is called "weird" simply because we've all been "getting used to" the former (but not the latter) since birth. But objectively, they are equally "sensible" or "weird".
 
Top