Wikipedia:Reference desk/Archives/Mathematics/2011 May 8

Mathematics desk
< May 7 << Apr | May | Jun >> May 9 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 8

edit

LaTeX arithmetic

edit

(Not sure which board is most appropriate.) I'm trying to use LaTeX, specifically Kile, to do some basic arithmetic. However, I seem to be stuck right back at the start, as I can't seem to get /multiply to do anything meaningful. Is this the command I want? All I want to do is perform some command on say, "5" and "4" and get "20" or "9" or "1" or whatever, as appropriate. Grandiose (me, talk, contribs) 15:24, 8 May 2011 (UTC)[reply]

I'm confused about what you're trying to do. As far as I know, LaTeX is for typesetting, not for computation. You can use
5\cdot4=20
To typeset  , but LaTeX isn't supposed to do the calculation itself. If I missed your point completely, can you provide more background? -- Meni Rosenfeld (talk) 16:42, 8 May 2011 (UTC)[reply]
I was hoping it could basic arithmetic as is suggested by places like this, but I couldn't follow what I needed to do off any of them. Grandiose (me, talk, contribs) 17:18, 8 May 2011 (UTC)[reply]
Yes it can do that. I don't know how... Staecker (talk) 20:27, 8 May 2011 (UTC)[reply]

OK I figured something out. I've never done this before, so I don't know if I'm doing it the right way. Integers can be stored in numbered "count registers". Here I'll define two count registers equal to 2 and 3, then display them, then multiply them and display the product:

\count1=2 
\count2=3
\the\count1 
\the\count2 
\multiply\count1\count2
\the\count1

The displayed output is 236. The registers are displayed using "\the", and "\multiply" overwrites the first register with the product. Staecker (talk) 20:40, 8 May 2011 (UTC)[reply]

Brilliant. Do you happen to know what addition, subtraction, and division will be? Grandiose (me, talk, contribs) 19:41, 9 May 2011 (UTC)[reply]
/advance is addition, it would seem, and /advance/count1-/count2 (for example) works for subtraction. I can't imagine / is going to work, though, in multiplication. Lucky for me, I don't have to do any. Grandiose (me, talk, contribs) 19:48, 9 May 2011 (UTC)[reply]
\divide is for division. See wikibooks:TeX/count for this and basically no additional information. Staecker (talk) 22:34, 9 May 2011 (UTC)[reply]
Make sure to use the backslash \ for LaTeX commands, and not the forward slash /. So it's \count and \multiply and not /count or /multiply. Fly by Night (talk) 00:51, 12 May 2011 (UTC)[reply]

Interesting series...

edit

Dear Wikipedians:

I am trying to find the sum of an interesting series whose general term is:

 

I realized that the power forms the triangular numbers, and the general term of triangular numbers is  , therefore the general term of the interesting series above can be written as:

 

 

 

So at this point it is clear that there is a geometric sequence subcomponent,  , to my interesting series. However, I am at a total loss about what to do for the   subcomponent, and also about how to separate the two subcomponents so that I could sum each one up individually.

Any help is greatly appreciated.

70.31.155.244 (talk) 16:03, 8 May 2011 (UTC)[reply]

I don't think there's a closed-form expression for the sum up to a finite term. For the infinite sum, Mathematica gives the result (assuming I'm reading it correctly)   (see Theta function) which is 1.371759117358... . I have no idea how to arrive at this result. -- Meni Rosenfeld (talk) 16:36, 8 May 2011 (UTC)[reply]

I don't think you'll be able to separate the two parts you're talking about. Note also that n2 + n is always even, so your exponent is always an integer. Michael Hardy (talk) 16:39, 8 May 2011 (UTC)[reply]

The article titled theta function says this:

 

There you see a sum of two terms in the exponent, in which one is a constant times n2 and the other is a constant times n, just as in your series. So we would want

 

Recall that that

 

So

 

So we want

 

This will hold if the coefficients of n2 and n agree. Thus we need

 

and

 

So

 

and

 

But you probably intended your series to run from 0 to ∞ rather than from −∞ to ∞, so mutatis mutandis....

To be continued...... Michael Hardy (talk) 17:03, 8 May 2011 (UTC) So[reply]

 

To be continued.... Michael Hardy (talk) 17:22, 8 May 2011 (UTC)[reply]

 

To be continued.... Michael Hardy (talk) 21:04, 8 May 2011 (UTC)[reply]

Hi Michael,   and   so that
 
 
 
 
and the final result is
 
Bo Jacoby (talk) 14:18, 9 May 2011 (UTC).[reply]
Or even simpler:
 
Bo Jacoby (talk) 07:37, 11 May 2011 (UTC).[reply]

Thanks to everyone for your contribution. Now I know that the series in question cannot possibly have any closed form expressions using elementary functions and their combinations/compositions thereof. L33th4x0r (talk) 17:15, 11 May 2011 (UTC)[reply]

  Resolved