Carl Love

Carl Love

28055 Reputation

25 Badges

13 years, 4 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@aroche In your first equation, the first sqrt encompasses the denominator; in Ed's original it does not. But anyway, the first equation is superfluous; the xi__8 cancels, leaving a tautology.

@nm It is a Riccati equation; however, this classification doesn't help Maple to solve it. As you showed, Maple's dsolve needs no help or prompting to solve it, See the Wikipedia article "Riccati equation",

It wasn't obvious to me whether the above approach would work over an extended finite field (i.e., one with p^k elements where p is prime and k > 1). The worksheet below shows that it does work.

Partial-fraction decomposition of rational functions over finite fields

Author: Carl Love <carl.j.love@gmail.com> 2025-May-18

restart
:

#This procedure simply improves the display of polynomials over
#extended finite fields; it has no mathematical significance:
Collect:= f-> subsindets(f, polynom, sort@collect, indets(f,name))
:

#This is how to make an operator that works with the `mod` operator:
`mod/Fullparfrac`:= (f,p)->
local x:= indets(f, name)[]:
    (Collect@map)(
        `mod/Normal`,
        convert((numer/(Factor@denom))(f) mod p, 'parfrac', x),
        p
    )
:

#Partial-fraction example over a simple finite field:
Fullparfrac(1/(x^9+x^6-x+1)) mod 11;

(5*x+1)/(x^2+1)+(3*x^4+4*x^3+6*x^2+5*x+4)/(x^5+7*x^4+6*x^3+2*x^2+5*x+5)+(3*x+6)/(x^2+4*x+9)

#Partial-fraction example over an extended finite field:
#
#First, create a degree-2 field extension of GF(2):
Randprime(2,x) mod 2; alias(xi= RootOf(%)):

x^2+x+1

#So, the 4 field elements of GF(2^2) will be denoted as
{0, 1, xi, xi+1};

{0, 1, xi+1, xi}

#Create a large reducible monic polynomial over GF(2^2) to use as the
#denominator of a rational function:
deg:= 9:
do
    d:= x^deg + Randpoly(deg-1, x, xi) mod 2
until nops((Factors(d) mod 2)[2]) > 2: #more than 2 factors
d:= Collect(d);

x^9+xi*x^8+(xi+1)*x^7+xi*x^5+(xi+1)*x^4+x^3+x+xi+1

pf:= Fullparfrac(x^(deg+1)/d) mod 2;

x+xi+(xi*x+xi+1)/(x^2+x+xi)+((xi+1)*x^5+(xi+1)*x^4+x^3+xi*x^2+xi*x+1)/(x^6+xi*x^4+xi*x^3+(xi+1)*x^2+xi*x+xi+1)+1/(x+xi+1)

#Verify that we get back the original numerator:
Normal(pf*d) mod 2;

x^10

 

Download ModParfrac.mw

@dharr The (poorly named) display command is not needed to display an unaltered already-existing-in-memory plot. You could simply use 

plt0;

or even just

%;

@Joe Riel The above can also be done via subs:

om:= kernelopts('opaquemodules'= false):
Statistics:-Visualization:-VennDiagram:-GenerateSize:= subs(
    "%.2f%%"= "%.0f%%", 
    eval(Statistics:-Visualization:-VennDiagram:-GenerateSize)
);
kernelopts('opaquemodules'= om):

An easier way: Using the same a,

simplify(sum(a(2*k-1) + a(2*k), k= 1..infinity));

This works because simplify will already know from the summation limits that k is a positive integer.

@Blanc In mathematical English, the term for a quotient of polynomials is rational function, not "rational fraction". The use of "fraction" perhaps led to some initial confusion regarding this Question. The "simple elements" of the decomposition are called (unfortunately) partial fractions. If a field of coefficients is specified (or implied), and all of the denominators are irreducible polynomials (or powers thereof) over that field, then it's a full partial-fraction decomposition.

@Blanc Here's a simpler procedure. It doesn't need the add or op or to treat irreducible denominators as special degenerate cases.

If you want to replace the general-case ​​​​​​Factor that I used by one of the more specific factorization procedures (BerlekampDistDegSqrfree), some very minor syntax changes might be needed, which I could provide. Each of those has its own help page.

restart
:

`mod/Fullparfrac`:= (f, p)->
    map(Normal, convert((numer/(Factor@denom))(f) mod p, parfrac)) mod p
:

Fullparfrac(1/(x^9+x^6-x+1)) mod 11;

(5*x+1)/(x^2+1)+(3*x+6)/(x^2+4*x+9)+(3*x^4+4*x^3+6*x^2+5*x+4)/(x^5+7*x^4+6*x^3+2*x^2+5*x+5)

 

 

Download ModParfrac.mw

@salim-barzani Obviously you've been posting nearly identical Questions under different usernames, the other name being @SSMB.

If some of your variables and parameters can be assumed to be real, it would make what your asking for easier.

Please post your algorithms as Maple code. I'm particularly interested in your set-partioning algorithm. (And your green-bordered example clearly shows that it's a multiset algorithm, which is significantly more difficult to do efficiently.) I'm not interested in the user-interface portions of your code, i.e., the parts the accept input from a user and display the output in a Maplet.

This should be a Question, not a Post. And since it contains the entire informational content of your previous Question, plus some additional (and very relevant) information, that previous Question should be deleted.

Do you understand that phi >= 0 does not imply sin(phi) >= 0, and that it's this latter inequality that allows for simplification under the square root? Here's your latest expression:

B:= sin(phi)^(13/4)*2^(3/4)*sqrt(cos(phi)^(5/2)*sqrt(2)
    /(sin(phi)*cos(phi))^(5/2))*a^2/(4*x^2) 
    + sin(phi)^2/(2*x^2)
:
simplify(B) assuming sin(phi) >= 0;
                               2 / 2    \
                       sin(phi)  \a  + 1/
                       ------------------
                                 2       
                              2 x        

@nm I think that you're losing the 2nd solution by using remove_RootOf. Use allvalues instead.

I'm on my phone at the moment, so I can't check this in Maple.

The last two commands used in your attached worksheet are eval and limit. The eval is "applying a substitution" and the limit is "applying the limit to get the exact answer" (the two things you asked for in your title). Both commands were successful; so I don't know what you're asking about.

If I've misinterpreted something, please post a worksheet where the final result is incomplete or incorrect. And please make it so that I don't have to enter formulas from the paper.

When asking a Question here, it's always best to post a worksheet whose final result is incorrect, incomplete, or gives an unexpected error message.

2 3 4 5 6 7 8 Last Page 4 of 709