iPhone应用闪退 无法打开 需要输入苹果ID的解决方法
百度 怎样才算睡了个好觉? 补觉是无效睡眠。
For challenges involving polynomials, mathematical expressions that consist of variables and coefficients.
93 questions
13
votes
7
answers
1k
views
Squaring the roots of a polynomial
In this challenge, you are given a polynomial \$p(x)\$, and you need to find a polynomial \$q(x)\$ whose roots are exactly the squares of the roots of \$p(x)\$ (counted with multiplicity). In other ...
7
votes
8
answers
366
views
Padé approximant of \$\exp(x)\$
In mathematics, a Padé approximant (Wikipedia, MathWorld) is the "best" approximation of a function by a rational function. For a function \$f(x)\$, the Padé approximant of order \$[m/n]\$ ...
13
votes
9
answers
1k
views
Sum of square roots (as an algebraic number)
An algebraic number is a number that is a root of a non-zero polynomial with integer coefficients. It is well-known that the sum of two algebraic numbers is algebraic. In particular, the sum of a list ...
10
votes
6
answers
605
views
Hermite interpolation
We already have a challenge for polynomial interpolation: given a list of points, output the coefficients of the polynomial that passes through them.
Hermite interpolation is a generalization of ...
7
votes
5
answers
585
views
Multiply multivariate polynomials
We already have a challenge about multiplying multiply single-variable polynomials. This challenge is about multiply two polynomials with multiple variables
Your task is given two multi-variable ...
19
votes
14
answers
3k
views
Rook Polynomials
In combinatorics, the rook polynomial \$R_{m,n}(x)\$ of a \$m \times n\$ chessboard is the generating function for the numbers of arrangements of non-attacking rooks. To be precise:
$$R_{m,n}(x) = \...
15
votes
7
answers
2k
views
Solve quadratic equations when 1+1=0
There already have been multiple challenges about carryless
multiplication, this challenge will work with the same calculation rules.
You task is given a quadratic polynomial ...
14
votes
15
answers
2k
views
Print all Polynomials
The set of all polynomials with integer coefficients is countable.
This means that there is a sequence that contains each polynomial with integer coefficients exactly once.
Your goal is it to write a ...
15
votes
14
answers
2k
views
Resultant of two polynomials
The resultant of two polynomials is a polynomial in their coefficients that is zero if and only if \$p\$ and \$q\$ have a common root. It is a useful tool for eliminating variables from systems of ...
13
votes
6
answers
1k
views
Approximate a root of an odd degree polynomial
Every odd degree polynomial has at least one real root. However this root does not have to be a rational number so your task is to output a sequence of rational numbers that approximates it.
Rules
...
10
votes
10
answers
528
views
CGAC2022 Day 3: \$n\$-dimensional Chocolate Pyramid
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
I've got an infinite supply of \$n\$-dimensional chocolate for some positive integer \$n\$. The shape of the ...
18
votes
16
answers
2k
views
Multiplicity of a root of a polynomial
Let \$p(x)\$ be a polynomial. We say \$a\$ is a root of multiplicity \$k\$ of \$p(x)\$, if there is another polynomial \$s(x)\$ such that \$p(x)=s(x)(x-a)^k\$ and \$s(a)\ne0\$.
For example, the ...
6
votes
2
answers
417
views
Partial Fractions
Given an input of a string, output the partial fraction in string form.
The partial fraction decomposition of a rational fraction of the form \$\frac{f(x)}{g(x)}\$, where \$f\$ and \$g\$ are ...
14
votes
7
answers
1k
views
Exponential transform of an integer sequence
The exponential generating function (e.g.f.) of a sequence \$a_n\$ is defined as the formal power series \$f(x) = \sum_{n=0}^{\infty} \frac{a_n}{n!} x^n\$.
When \$a_0 = 0\$, we can apply the ...
18
votes
16
answers
2k
views
Fibonacci polynomials
The Fibonacci polynomials are a polynomial sequence defined as:
\$F_0(x) = 0\$
\$F_1(x) = 1\$
\$F_n(x) = x F_{n-1}(x) + F_{n-2}(x)\$
The first few Fibonacci polynomials are:
\$F_0(x) = 0\$
\$F_1(x) ...