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

From testwiki
Jump to navigation Jump to search

Template:Error:not substituted

{| width = "100%"

|- ! colspan="3" align="center" | Mathematics desk |- ! width="20%" align="left" | < May 7 ! width="25%" align="center"|<< Apr | May | Jun >> ! width="20%" align="right" |Current desk > |}

Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded 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

LaTeX arithmetic

(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)

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 54=20, 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)
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)
Yes it can do that. I don't know how... Staecker (talk) 20:27, 8 May 2011 (UTC)

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)

Brilliant. Do you happen to know what addition, subtraction, and division will be? Grandiose (me, talk, contribs) 19:41, 9 May 2011 (UTC)
/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)
\divide is for division. See wikibooks:TeX/count for this and basically no additional information. Staecker (talk) 22:34, 9 May 2011 (UTC)
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)

Interesting series...

Dear Wikipedians:

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

(13)(13)2(13)n

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

(13)n2+n2

=(13)n22(13)n2

=(13)n2(13)n

So at this point it is clear that there is a geometric sequence subcomponent, (13)n, to my interesting series. However, I am at a total loss about what to do for the (13)n2 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)

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) θ2(0;1/3) (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)

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)

The article titled theta function says this:

ϑ(z;τ)=n=exp(πin2τ+2πinz)

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

eπin2τ+2πinz=(13)n2+n.

Recall that that

13=e(loge3)/2.

So

(13)n2+n=e(n2+n)(loge3)/2.

So we want

(n2+n)(loge3)2=πin2τ+2πinz

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

loge32=πiτ,

and

loge32=2πiz.

So

τ=iloge3π

and

z=iloge32π.

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

n=exp(πin2τ+2πinz)=1+n=1exp(πin2τ+2πinz)+exp(πin2τ2πinz)

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

=1+n=1exp(πin2τ)(exp(2πinz)+1exp(2πinz))

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

Hi Michael, τ=ilog32π and z=ilog34π so that
ϑ(ilog34π;ilog32π)=n=3n(n+1)2
=(n=2+n=10+n=1)3n(n+1)2
=n=23n(n1)2+2+n=13n(n+1)2
=2+2n=13n(n+1)2
and the final result is
n=13n(n+1)2=12ϑ(ilog34π;ilog32π)1.
Bo Jacoby (talk) 14:18, 9 May 2011 (UTC).
Or even simpler:
n=03n(n+1)2=12ϑ(ilog34π;ilog32π).
Bo Jacoby (talk) 07:37, 11 May 2011 (UTC).

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)

Template:Resolved