Message Boards Message Boards

0
|
4077 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

[?] Substitute indeterminate depending on degree?

Posted 7 years ago

Dears, suppose I define a polynomial

u:= 5+3*x+4*x^2;

I would like for this polynomial to substitute x with a specific value, say 0, only when it takes degree one. Do you know how this can be achieved?

Many thanks in advance Manuele

POSTED BY: Manuele Leonelli

Is this what you are looking for?

u = 5 + 3 x + 4 x^2;
u /. {x^n_ -> x^n, x -> 0}

It will produce 5 + 4 x^2.

POSTED BY: Chi-Hsiang Wang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract