Wikipedia:Reference desk/Archives/Mathematics/2009 February 17

= February 17 =

Finding unknown constant in function
Disclaimer: I'm not at all good at math, so this may be a stupid question.

I have no idea if the title I chose is at all descriptive, but it was the best I could think of. This isn't homework; in fact I asked my school math teacher and he couldn't tell me. My problem in practical terms would take forever to explain, but I've formalized it (hopefully correctly) as this:

$$f(x) = -x^4 + k$$ and $$c = \int_a^b f(x)$$. Given $$c$$, $$a$$ and $$b$$, how can I find $$k$$?.

Aforementioned math teacher assures me it's possible; he just couldn't tell me how off the top of his head.

I could easily write a program to brute-force it, but that would be too slow for what I want to use it for (even given OCaml or C) (and besides it's really ugly and I want to know how to do it properly).

Thanks a lot, and apologies if I've screwed up the problem description - let me know if I've missed anything. -- Aseld  talk  12:47, 17 February 2009 (UTC)
 * $$c=-\frac{b^5}{5}+bk +\frac{a^5}{5}-ak$$. Rearrange and solve. Algebraist 13:16, 17 February 2009 (UTC)
 * Ah, using the indefinite integral. Thanks a lot. -- Aseld  talk  13:25, 17 February 2009 (UTC)
 * Well, no, it's a definite integral, but you do them by finding the antiderivative (which is the indefinite integral) and substituting in. --Tango (talk) 13:48, 17 February 2009 (UTC)
 * What is the difference between an antiderivative and an indefinite integral? Or are they just two names for the same thing? 92.1.184.208 (talk) 15:01, 17 February 2009 (UTC)
 * They're the same thing (well, almost. Some authors define the indefinite integral to be the set of all antiderivatives). Antiderivative is a much better term, to my mind. Algebraist 15:04, 17 February 2009 (UTC)
 * What I meant was, you're using the indefinite integral, which I had all but forgotten existed. -- Aseld  talk  19:39, 17 February 2009 (UTC)
 * It's not indefinite, though, it's definite. There are limits of integration. Indefinite and definite integrals are essentially the same thing, just with definite ones you substitute in the limits and with indefinite you leave it in terms of x (and add a constant). The one in your problem is definite. --Tango (talk) 20:57, 17 February 2009 (UTC)
 * What concerns me is that a "math teacher" couldn't do this. It was obvious on inspection that a linear function of k would arise. Is he qualified for the job he has?86.160.105.65 (talk) 19:47, 17 February 2009 (UTC)
 * It sounds like the OP hasn't learnt calculus properly and is just learning it themselves, so the teacher probably doesn't teach at a level that does calculus so it may have been years since they've used it. --Tango (talk) 20:57, 17 February 2009 (UTC)
 * Pretty much. I'm sure he could have worked it out, he just couldn't tell me off the top of his head. -- Aseld  talk  23:36, 17 February 2009 (UTC)
 * There's nothing to work out. Either you know how to integrate polynomials or you don't (they are the first integrals anyone learns). --Tango (talk) 00:16, 18 February 2009 (UTC)


 * Sorry, you can't solve it without a dx in the integral so it is not solvable(unless f(x) can be simplified into g(x)dx where g(x) is an arbitrary function with no lone differential in it). The Successor of Physics  11:55, 18 February 2009 (UTC)
 * Good point - I think Algebraist and I were just assuming the dx being missing with just a typo, but we should have stated that. --Tango (talk) 14:52, 18 February 2009 (UTC)
 * He didn't state what measure he was integrating with respect to, either. As always, you have to infer things from context. Algebraist 16:02, 18 February 2009 (UTC)
 * Yes. Apologies; the missing dx was an oversight. Algebraist, do you mean that I should have stated that I was integrating with respect to x? Again, apologies; I'll remember that next time. -- Aseld  talk  08:24, 19 February 2009 (UTC)
 * I meant that notational omissions that don't cause confusion are not worth worrying about. Algebraist 12:15, 19 February 2009 (UTC)

Simplifying an Equation
This is for part of my homework on potential dividers, I've got so far, but I can't seem to simplify this equation. The equation I'm trying to simplify is this: Potential_divider. I've got these two equations:


 * $$V_{\text{out}} = \frac {R_2 \| R_{\text{L}}} { R_1+R_2 \| R_{\text{L}} } V_{\text{in}}$$ and $$\quad R_2 \| R_{\text{L}} \triangleq \left( \frac{1}{R_2} + \frac{1}{R_{\text{L}}} \right)^{-1} = \frac{R_2 R_{\text{L}}}{ R_2 + R_{\text{L}} }\,, $$

and they are supposed to simplify to this equation $$V_{\text{out}} = \frac {R_2}{R_1 \left( 1 + \frac {R_2}{R_{\text{L}} } \right) + R_2 } V_{\text{in}} \quad$$

Any help with the steps of simplifying this would help, thanks Jammie (talk) 17:31, 17 February 2009 (UTC)


 * Start by dividing top and bottom by $$R_2 \| R_{\text{L}}$$ and it should be obvious from there. --Tango (talk) 17:44, 17 February 2009 (UTC)

Principal Ideal Ring, not an Integral Domain
Hi. I'm studying some algebra, and noting that a P.I.D. is defined as a Principal Ideal Ring that is also an Integral Domain. This suggests to me that there exist Principal Ideal Rings that are not Integral Domains, but I can't seem to find one or dream one up. Can anyone give me a push in the right direction? Thanks in advance. -GTBacchus(talk) 17:35, 17 February 2009 (UTC)


 * How about $$\Z_4$$? --Tango (talk) 17:41, 17 February 2009 (UTC)


 * I guess that works. Thanks. When I need a ring with zero divisors, I should probably think of $$\Z_n$$ for composite n. Now let me see if I can take it another step. If we want a ring that is a P.I.R., but lacks unity, then we can use the ideal generated by 2 in $$\Z_4$$! I think I'm getting the hang of it; thanks again. -GTBacchus(talk) 18:15, 17 February 2009 (UTC)


 * Indeed, $$\Z_4$$ is always my first choice when looking for a counterexample involving zero divisors ($$\Z_6$$ is useful sometimes too, as having distinct prime factors can make a difference). The ideal generated by 2 is rather a trivial example of a P.I.R - it only has one non-zero element, so there is no way you could even try and make a non-principle ideal - but I guess it is an example. --Tango (talk) 18:38, 17 February 2009 (UTC)

Maximal LFSRs
If I want a maximum length sequence from an LFSR I have to connect the right feedback taps, usually 2 or 4 of them. The article gives a table of equations that correspond to the tap numbers for up to a 19-stage register and I can confirm these are right by simulating them in software. When I need a longer sequence tells me "There is no quick way to determine if a tap sequence is maximal length." while this reference tabulates tap numbers for up to 168 stages. That gives a huge maximal sequence that is impractical to "run" (simulate) on any computer known. How can anyone find (test) tap numbers for such big registers? Cuddlyable3 (talk) 20:18, 17 February 2009 (UTC)


 * If one can factor 2^n-1, then one can calculate the order of an (irreducible) n-stage LFSR fairly easily. One can check irreducibility fairly quickly, and if the  lfsr has maximal length, then it is irreducible.
 * Basically, the irreducible polynomial of degree n over a field of size q defines a finite field of size q^n, and "x" is a nonzero element of these field, so generates a cyclic subgroup of a cyclic group of order q^n-1. To calculate the order of x just means checking the prime divisors p of q^n-1 to see if x^((q^n-1)/p) = 1, which can be done in time polynomial in n (assuming q fixed and p known) using exponentiation by squaring.  Finding primitive polynomials is basically easy, but for computer science applications people tend to want sparse primitive polynomials which are a bit harder to find and not known to exist.  You said you only needed to connect 2 to 4 taps, but if you let me choose your maximal length LFSR you probably need to connect about half of them. JackSchmidt (talk) 21:32, 17 February 2009 (UTC)
 * It will help me if you would be kind enough to take me step by step through finding taps for a maximal 21 (say) -stage LFSR. I wrote "usually 2 or 4" taps because I gather from the mysterious table that 2 or 4 taps always suffices. I don't know how one proves that. Cuddlyable3 (talk) 12:34, 18 February 2009 (UTC)


 * "2 or 4 taps always suffices" is roughly speaking an open problem in the theory of finite fields as far as I know.


 * For an example of finding a maximal LFSR, let's start with 4 stage. We first need an irreducible polynomial of degree 4 over the binary field GF(2). Let's use f = x^4+x^3+x^2+x+1 = (x^5-1)/(x-1).  It is then easy to see that x has order 5 in the finite field F = GF(2)[x]/(x^4+x^3+x^2+x+1) of size 16, since x^5=1 mod x^5-1.  We need a polynomial where x has order 2^4-1 = 15, not 5.  We then compute the minimal polynomial of random elements of F until we find an element with order 15.  Let's check A=x+1. Now (x+1)^3 = x^3+x^2+x+1 mod f is not 1, so x+1 does not have order 3, and (x+1)^5 = x^3+x^2+1 mod f is not 1, so x+1 does not have order 5.  By Lagrange's theorem, x+1 must have order 15 (the only divisor of 15 left).  Hence we wan to compute its minimal polynomial, that is we want to find a relation of linear dependence amongst (x+1)^i for i=0,1,...,4.  The powers mod f are just: 1, x+1, x^2+1, x^3+x^2+x+1, x^3+x^2+x.  We check that A^4 + A^3 + 1 = 0 mod f, and so our primitive polynomial is x^4 + x^3 + 1, agreeing with the table in LFSR.


 * Ok, now for n=21, we first need an irreducible polynomial of degree 21 over GF(2). Let's choose f = x^21 + x^7 + 1.  Now 2^21 - 1 = 7*7*127*337, and we check that x^49 = 1 mod f yet x^7 is not 1 mod f, so x has order exactly 49 in F = GF(2)[x]/(f).  We want it to have order 2^21-1, so this is not good enough.  We choose a random element of the field F like A=x+1, and check its powers. A^((2^21-1)/7) mod f is not 1, A^((2^21-1)/127)) mod f is not 1, and A^((2^21-1)/337) mod f is not 1, so the order of A in F is exactly 2^21-1.  Now we just need to find its minimal polynomial.  Its powers A^0,...,A^21 are: 1, x+1, x^2+1, x^3+x^2+x+1, x^4+1, x^5+x^4+x+1, x^6+x^4+x^2+1, x^7+x^6+x^5+x^4+x^3+x^2+x+1, x^8+1, x^9+x^8+x+1, x^10+x^8+x^2+1, x^11+x^10+x^9+x^8+x^3+x^2+x+1, x^12+x^8+x^4+1, x^13+x^12+x^9+x^8+x^5+x^4+x+1, x^14+x^12+x^10+x^8+x^6+x^4+x^2+1, x^15+x^14+x^13+x^12+x^11+x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1, x^16+1, x^17+x^16+x+1, x^18+x^16+x^2+1, x^19+x^18+x^17+x^16+x^3+x^2+x+1, x^20+x^16+x^4+1, x^20+x^17+x^16+x^7+x^5+x^4+x.  We then see that A^21 + A^20 + A^17 + A^16 + A^7 + A^6 + A^3 + A^2 + 1 = 0 mod f, so our primitive polynomial is x^21 + x^20 + x^17 + x^16 + x^7 + x^6 + x^3 + x^2 + 1.  Notice that it has 7ish taps, and that my method expects to get about 10 taps for the 21 stage LFSR.


 * However, many people are not interested in any old 21-stage LFSR of length 2^21-1. Many people want one with very few taps.  I suspect that most people would want to use x^21 + x^2 + 1 as it is also primitive and has fewer terms.


 * The lexicographically first primitive polynomial for n=21,22,23,24 are:
 * x^21 + x^2 + 1
 * x^22 + x + 1
 * x^23 + x^5 + 1
 * x^24 + x^4 + x^3 + x + 1.
 * These take less than a second to compute by a brute force search, but using reasonably smart irreducibility and primitivity tests. JackSchmidt (talk) 17:36, 18 February 2009 (UTC)


 * Finding the lexicographically first primitive polynomial with 2 or 4 taps (3 or 5 terms) of degrees n=2..169 took 4 minutes, for what it is worth. It made no attempt to get 2 taps instead of 4, but often did find a 2 tap first. JackSchmidt (talk) 17:50, 18 February 2009 (UTC)
 * It is worth my thanks.Cuddlyable3 (talk) 14:30, 19 February 2009 (UTC)

CHain rule question
A viscous liquid is poured onto a flat surface. It forms a circular patch whose area grows at a constant rate of 5 cm/s. Find in terms of π, the radius after 20 seconds

Using the chain rule I get dA/dt = dA/dr x dr/dt 5 = 2πr x dr/dt

That's as far as I can get. Any hints? --RMFan1 (talk) 23:03, 17 February 2009 (UTC)


 * I don't think you need the chain rule - the questions asks for the radius after 20 seconds, not the rate of growth of the radius. After 20 seconds we have A = 100 cm2 (I think that rate of growth should be 5 cm2/s), and A = πr2, so r is ... Gandalf61 (talk) 23:11, 17 February 2009 (UTC)


 * I was so focused on using the chain rule (as that's the chapter I'm on) that I completely missed the obvious. Thanks. --RMFan1 (talk) 23:34, 17 February 2009 (UTC)