Alias for root of a polynomialHow to find solutions that yield of root of unity?First positive rootSolution of equation with power series (perturbation)Find Root IterationGetting the polynomial from a polinomial root equationIs there a way to select the highest exponent of a polynomial expression?Grouping terms in Taylor expansionAlgebraic substitution for polynomial simplificationHow to expand a composite function into series?
What would be the effect of a giant magical fireball burning in the ocean?
Should I trust the p value in statistical testings
Does cover affect melee attacks?
Does my protagonist need to be the most important character?
How to prove that invoices are really unpaid?
Is this smoke detector safely connected?
What is the gold linker?
Charges from Dollar General have never shown up on my debit card. How can I resolve this?
If we should encrypt the message rather than the method of transfer, why do we care about wifi security? Is this just security theatre?
On notice period - coworker I need to train is giving me the silent treatment
What are the branches of statistics?
Do more Americans want the Bidens investigated than Trump impeached?
Drawing a sequence of circles
Direct consequences for Trump if he continues hindering impeachment investigation?
If I did not sign promotion bonus document, my career would be over. Is this duress?
How to extract *.tgz.part-*?
I am often given, occasionally stolen, rarely sold, and never borrowed
Did it take 3 minutes to reload a musket when the second amendment to the US constitution was ratified?
Does Darwin owe a debt to Hegel?
How to figure out key from key signature?
Latest newtx package update (v1.601 Oct 2, 2019) breaks the footnote command [update: bug fixed by package author]
Why does Principal Vagina say, "no relation" after introducing himself?
Why is Trump releasing (or not) his tax returns such a big deal?
Why are second inversion triads considered less consonant than first inversion triads?
Alias for root of a polynomial
How to find solutions that yield of root of unity?First positive rootSolution of equation with power series (perturbation)Find Root IterationGetting the polynomial from a polinomial root equationIs there a way to select the highest exponent of a polynomial expression?Grouping terms in Taylor expansionAlgebraic substitution for polynomial simplificationHow to expand a composite function into series?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
.everyonelovesstackoverflowposition:absolute;height:1px;width:1px;opacity:0;top:0;left:0;pointer-events:none;
$begingroup$
I need to work with a variable $u$ such that $u^2 + u + 1 = 0$. I don't want to find a root of the polynomial $u^2 + u + 1$. Rather, I have to work with $u$ symbolically so that a (polynomial) expression in $u$ gets simplified using the equation $u^2 + u + 1 =0$.
For example, let
y = Series[u + 1 + u*x + x^2, x, 0, 4]
z = Series[u^2 + u^2*x + x^4, x, 0, 4]
Then, I'd expect
SeriesCoefficient[y+z, 0] = 0
SeriesCoefficient[y+z, 1] = -1
Thank you.
symbolic polynomials series-expansion
$endgroup$
add a comment
|
$begingroup$
I need to work with a variable $u$ such that $u^2 + u + 1 = 0$. I don't want to find a root of the polynomial $u^2 + u + 1$. Rather, I have to work with $u$ symbolically so that a (polynomial) expression in $u$ gets simplified using the equation $u^2 + u + 1 =0$.
For example, let
y = Series[u + 1 + u*x + x^2, x, 0, 4]
z = Series[u^2 + u^2*x + x^4, x, 0, 4]
Then, I'd expect
SeriesCoefficient[y+z, 0] = 0
SeriesCoefficient[y+z, 1] = -1
Thank you.
symbolic polynomials series-expansion
$endgroup$
$begingroup$
I'm a Python/R user, this is unintelligible to me, can you explain without Mathematica jargon please?
$endgroup$
– smci
May 14 at 5:51
add a comment
|
$begingroup$
I need to work with a variable $u$ such that $u^2 + u + 1 = 0$. I don't want to find a root of the polynomial $u^2 + u + 1$. Rather, I have to work with $u$ symbolically so that a (polynomial) expression in $u$ gets simplified using the equation $u^2 + u + 1 =0$.
For example, let
y = Series[u + 1 + u*x + x^2, x, 0, 4]
z = Series[u^2 + u^2*x + x^4, x, 0, 4]
Then, I'd expect
SeriesCoefficient[y+z, 0] = 0
SeriesCoefficient[y+z, 1] = -1
Thank you.
symbolic polynomials series-expansion
$endgroup$
I need to work with a variable $u$ such that $u^2 + u + 1 = 0$. I don't want to find a root of the polynomial $u^2 + u + 1$. Rather, I have to work with $u$ symbolically so that a (polynomial) expression in $u$ gets simplified using the equation $u^2 + u + 1 =0$.
For example, let
y = Series[u + 1 + u*x + x^2, x, 0, 4]
z = Series[u^2 + u^2*x + x^4, x, 0, 4]
Then, I'd expect
SeriesCoefficient[y+z, 0] = 0
SeriesCoefficient[y+z, 1] = -1
Thank you.
symbolic polynomials series-expansion
symbolic polynomials series-expansion
asked May 13 at 15:08
MyathMyath
1544 bronze badges
1544 bronze badges
$begingroup$
I'm a Python/R user, this is unintelligible to me, can you explain without Mathematica jargon please?
$endgroup$
– smci
May 14 at 5:51
add a comment
|
$begingroup$
I'm a Python/R user, this is unintelligible to me, can you explain without Mathematica jargon please?
$endgroup$
– smci
May 14 at 5:51
$begingroup$
I'm a Python/R user, this is unintelligible to me, can you explain without Mathematica jargon please?
$endgroup$
– smci
May 14 at 5:51
$begingroup$
I'm a Python/R user, this is unintelligible to me, can you explain without Mathematica jargon please?
$endgroup$
– smci
May 14 at 5:51
add a comment
|
3 Answers
3
active
oldest
votes
$begingroup$
You can use Assumptions
assume = u^2 + u + 1 == 0;
y = Series[u + 1 + u*x + x^2, x, 0, 4];
z = Series[u^2 + u^2*x + x^4, x, 0, 4];
Assuming[assume, SeriesCoefficient[y + z, 0] // Simplify]
(* 0 *)
Assuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
(* -1 *)
$endgroup$
$begingroup$
Withy = Series[u + 1 + x^2, x, 0, 4]
your method producesu^2
forAssuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
. I think the expected result is-1-u
.
$endgroup$
– Carl Woll
May 13 at 20:26
$begingroup$
@CarlWoll - I do not know what is "expected", butLeafCount /@ u^2, -1 - u
indicates thatu^2
is simpler in the usual sense.
$endgroup$
– Bob Hanlon
May 13 at 20:30
add a comment
|
$begingroup$
You can give u
an UpValues
for Power
:
u /: u^n_Integer := Block[u,
If[n<0,
PolynomialMod[(-u-1)^-n, 1+u+u^2],
PolynomialMod[u^n,1+u+u^2]
]
]
Then:
y = Series[u + 1 + u x + x^2, x, 0, 4];
z = Series[u^2 + u^2 x + x^4,x, 0, 4];
and:
y + z //TeXForm
$-x+x^2+x^4+Oleft(x^5right)$
$endgroup$
$begingroup$
Carl, what does theBlock[u, ...]
do here? I think I'm still confused about the usage ofBlock
.
$endgroup$
– Roman
May 13 at 15:46
1
$begingroup$
@Roman The Block is needed so that recursion is avoided (preventing evaluation of u^n on the right hand side)
$endgroup$
– Carl Woll
May 13 at 16:00
$begingroup$
I get Iteration limit exceeded with $1/u$.
$endgroup$
– Myath
May 13 at 17:40
add a comment
|
$begingroup$
The simplest methods are usually the best. I suggest
rule = u^n_ :> 1, u, -1 - u[[Mod[n, 3] + 1]];
y + z /. rule
which will do what you want. Also, the following code
Table[u^n, n, 0, 6] /. rule
demonstrates that $u^3 = 1$ and the powers of $u$ are periodic with period $3$.
$endgroup$
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f198272%2falias-for-root-of-a-polynomial%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can use Assumptions
assume = u^2 + u + 1 == 0;
y = Series[u + 1 + u*x + x^2, x, 0, 4];
z = Series[u^2 + u^2*x + x^4, x, 0, 4];
Assuming[assume, SeriesCoefficient[y + z, 0] // Simplify]
(* 0 *)
Assuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
(* -1 *)
$endgroup$
$begingroup$
Withy = Series[u + 1 + x^2, x, 0, 4]
your method producesu^2
forAssuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
. I think the expected result is-1-u
.
$endgroup$
– Carl Woll
May 13 at 20:26
$begingroup$
@CarlWoll - I do not know what is "expected", butLeafCount /@ u^2, -1 - u
indicates thatu^2
is simpler in the usual sense.
$endgroup$
– Bob Hanlon
May 13 at 20:30
add a comment
|
$begingroup$
You can use Assumptions
assume = u^2 + u + 1 == 0;
y = Series[u + 1 + u*x + x^2, x, 0, 4];
z = Series[u^2 + u^2*x + x^4, x, 0, 4];
Assuming[assume, SeriesCoefficient[y + z, 0] // Simplify]
(* 0 *)
Assuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
(* -1 *)
$endgroup$
$begingroup$
Withy = Series[u + 1 + x^2, x, 0, 4]
your method producesu^2
forAssuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
. I think the expected result is-1-u
.
$endgroup$
– Carl Woll
May 13 at 20:26
$begingroup$
@CarlWoll - I do not know what is "expected", butLeafCount /@ u^2, -1 - u
indicates thatu^2
is simpler in the usual sense.
$endgroup$
– Bob Hanlon
May 13 at 20:30
add a comment
|
$begingroup$
You can use Assumptions
assume = u^2 + u + 1 == 0;
y = Series[u + 1 + u*x + x^2, x, 0, 4];
z = Series[u^2 + u^2*x + x^4, x, 0, 4];
Assuming[assume, SeriesCoefficient[y + z, 0] // Simplify]
(* 0 *)
Assuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
(* -1 *)
$endgroup$
You can use Assumptions
assume = u^2 + u + 1 == 0;
y = Series[u + 1 + u*x + x^2, x, 0, 4];
z = Series[u^2 + u^2*x + x^4, x, 0, 4];
Assuming[assume, SeriesCoefficient[y + z, 0] // Simplify]
(* 0 *)
Assuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
(* -1 *)
answered May 13 at 18:15
Bob HanlonBob Hanlon
66.6k3 gold badges37 silver badges102 bronze badges
66.6k3 gold badges37 silver badges102 bronze badges
$begingroup$
Withy = Series[u + 1 + x^2, x, 0, 4]
your method producesu^2
forAssuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
. I think the expected result is-1-u
.
$endgroup$
– Carl Woll
May 13 at 20:26
$begingroup$
@CarlWoll - I do not know what is "expected", butLeafCount /@ u^2, -1 - u
indicates thatu^2
is simpler in the usual sense.
$endgroup$
– Bob Hanlon
May 13 at 20:30
add a comment
|
$begingroup$
Withy = Series[u + 1 + x^2, x, 0, 4]
your method producesu^2
forAssuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
. I think the expected result is-1-u
.
$endgroup$
– Carl Woll
May 13 at 20:26
$begingroup$
@CarlWoll - I do not know what is "expected", butLeafCount /@ u^2, -1 - u
indicates thatu^2
is simpler in the usual sense.
$endgroup$
– Bob Hanlon
May 13 at 20:30
$begingroup$
With
y = Series[u + 1 + x^2, x, 0, 4]
your method produces u^2
for Assuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
. I think the expected result is -1-u
.$endgroup$
– Carl Woll
May 13 at 20:26
$begingroup$
With
y = Series[u + 1 + x^2, x, 0, 4]
your method produces u^2
for Assuming[assume, SeriesCoefficient[y + z, 1] // Simplify]
. I think the expected result is -1-u
.$endgroup$
– Carl Woll
May 13 at 20:26
$begingroup$
@CarlWoll - I do not know what is "expected", but
LeafCount /@ u^2, -1 - u
indicates that u^2
is simpler in the usual sense.$endgroup$
– Bob Hanlon
May 13 at 20:30
$begingroup$
@CarlWoll - I do not know what is "expected", but
LeafCount /@ u^2, -1 - u
indicates that u^2
is simpler in the usual sense.$endgroup$
– Bob Hanlon
May 13 at 20:30
add a comment
|
$begingroup$
You can give u
an UpValues
for Power
:
u /: u^n_Integer := Block[u,
If[n<0,
PolynomialMod[(-u-1)^-n, 1+u+u^2],
PolynomialMod[u^n,1+u+u^2]
]
]
Then:
y = Series[u + 1 + u x + x^2, x, 0, 4];
z = Series[u^2 + u^2 x + x^4,x, 0, 4];
and:
y + z //TeXForm
$-x+x^2+x^4+Oleft(x^5right)$
$endgroup$
$begingroup$
Carl, what does theBlock[u, ...]
do here? I think I'm still confused about the usage ofBlock
.
$endgroup$
– Roman
May 13 at 15:46
1
$begingroup$
@Roman The Block is needed so that recursion is avoided (preventing evaluation of u^n on the right hand side)
$endgroup$
– Carl Woll
May 13 at 16:00
$begingroup$
I get Iteration limit exceeded with $1/u$.
$endgroup$
– Myath
May 13 at 17:40
add a comment
|
$begingroup$
You can give u
an UpValues
for Power
:
u /: u^n_Integer := Block[u,
If[n<0,
PolynomialMod[(-u-1)^-n, 1+u+u^2],
PolynomialMod[u^n,1+u+u^2]
]
]
Then:
y = Series[u + 1 + u x + x^2, x, 0, 4];
z = Series[u^2 + u^2 x + x^4,x, 0, 4];
and:
y + z //TeXForm
$-x+x^2+x^4+Oleft(x^5right)$
$endgroup$
$begingroup$
Carl, what does theBlock[u, ...]
do here? I think I'm still confused about the usage ofBlock
.
$endgroup$
– Roman
May 13 at 15:46
1
$begingroup$
@Roman The Block is needed so that recursion is avoided (preventing evaluation of u^n on the right hand side)
$endgroup$
– Carl Woll
May 13 at 16:00
$begingroup$
I get Iteration limit exceeded with $1/u$.
$endgroup$
– Myath
May 13 at 17:40
add a comment
|
$begingroup$
You can give u
an UpValues
for Power
:
u /: u^n_Integer := Block[u,
If[n<0,
PolynomialMod[(-u-1)^-n, 1+u+u^2],
PolynomialMod[u^n,1+u+u^2]
]
]
Then:
y = Series[u + 1 + u x + x^2, x, 0, 4];
z = Series[u^2 + u^2 x + x^4,x, 0, 4];
and:
y + z //TeXForm
$-x+x^2+x^4+Oleft(x^5right)$
$endgroup$
You can give u
an UpValues
for Power
:
u /: u^n_Integer := Block[u,
If[n<0,
PolynomialMod[(-u-1)^-n, 1+u+u^2],
PolynomialMod[u^n,1+u+u^2]
]
]
Then:
y = Series[u + 1 + u x + x^2, x, 0, 4];
z = Series[u^2 + u^2 x + x^4,x, 0, 4];
and:
y + z //TeXForm
$-x+x^2+x^4+Oleft(x^5right)$
edited May 13 at 17:49
answered May 13 at 15:34
Carl WollCarl Woll
92.1k3 gold badges121 silver badges233 bronze badges
92.1k3 gold badges121 silver badges233 bronze badges
$begingroup$
Carl, what does theBlock[u, ...]
do here? I think I'm still confused about the usage ofBlock
.
$endgroup$
– Roman
May 13 at 15:46
1
$begingroup$
@Roman The Block is needed so that recursion is avoided (preventing evaluation of u^n on the right hand side)
$endgroup$
– Carl Woll
May 13 at 16:00
$begingroup$
I get Iteration limit exceeded with $1/u$.
$endgroup$
– Myath
May 13 at 17:40
add a comment
|
$begingroup$
Carl, what does theBlock[u, ...]
do here? I think I'm still confused about the usage ofBlock
.
$endgroup$
– Roman
May 13 at 15:46
1
$begingroup$
@Roman The Block is needed so that recursion is avoided (preventing evaluation of u^n on the right hand side)
$endgroup$
– Carl Woll
May 13 at 16:00
$begingroup$
I get Iteration limit exceeded with $1/u$.
$endgroup$
– Myath
May 13 at 17:40
$begingroup$
Carl, what does the
Block[u, ...]
do here? I think I'm still confused about the usage of Block
.$endgroup$
– Roman
May 13 at 15:46
$begingroup$
Carl, what does the
Block[u, ...]
do here? I think I'm still confused about the usage of Block
.$endgroup$
– Roman
May 13 at 15:46
1
1
$begingroup$
@Roman The Block is needed so that recursion is avoided (preventing evaluation of u^n on the right hand side)
$endgroup$
– Carl Woll
May 13 at 16:00
$begingroup$
@Roman The Block is needed so that recursion is avoided (preventing evaluation of u^n on the right hand side)
$endgroup$
– Carl Woll
May 13 at 16:00
$begingroup$
I get Iteration limit exceeded with $1/u$.
$endgroup$
– Myath
May 13 at 17:40
$begingroup$
I get Iteration limit exceeded with $1/u$.
$endgroup$
– Myath
May 13 at 17:40
add a comment
|
$begingroup$
The simplest methods are usually the best. I suggest
rule = u^n_ :> 1, u, -1 - u[[Mod[n, 3] + 1]];
y + z /. rule
which will do what you want. Also, the following code
Table[u^n, n, 0, 6] /. rule
demonstrates that $u^3 = 1$ and the powers of $u$ are periodic with period $3$.
$endgroup$
add a comment
|
$begingroup$
The simplest methods are usually the best. I suggest
rule = u^n_ :> 1, u, -1 - u[[Mod[n, 3] + 1]];
y + z /. rule
which will do what you want. Also, the following code
Table[u^n, n, 0, 6] /. rule
demonstrates that $u^3 = 1$ and the powers of $u$ are periodic with period $3$.
$endgroup$
add a comment
|
$begingroup$
The simplest methods are usually the best. I suggest
rule = u^n_ :> 1, u, -1 - u[[Mod[n, 3] + 1]];
y + z /. rule
which will do what you want. Also, the following code
Table[u^n, n, 0, 6] /. rule
demonstrates that $u^3 = 1$ and the powers of $u$ are periodic with period $3$.
$endgroup$
The simplest methods are usually the best. I suggest
rule = u^n_ :> 1, u, -1 - u[[Mod[n, 3] + 1]];
y + z /. rule
which will do what you want. Also, the following code
Table[u^n, n, 0, 6] /. rule
demonstrates that $u^3 = 1$ and the powers of $u$ are periodic with period $3$.
edited May 13 at 21:58
AccidentalFourierTransform
7,0631 gold badge12 silver badges45 bronze badges
7,0631 gold badge12 silver badges45 bronze badges
answered May 13 at 18:09
SomosSomos
3,0401 gold badge2 silver badges11 bronze badges
3,0401 gold badge2 silver badges11 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f198272%2falias-for-root-of-a-polynomial%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
I'm a Python/R user, this is unintelligible to me, can you explain without Mathematica jargon please?
$endgroup$
– smci
May 14 at 5:51