Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.1K Views
|
7 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Linearize a polynomial in several variables?

Posted 6 years ago

Hello everyone,

I would like to linearization polynomial in several variables. For example, we can linearize 1 + x + y + z+ x y + x y z to 1 + x + y + z but how can we get like this result in Mathematica please?

Regards, Omar

POSTED BY: Omar Alsuhaimi
7 Replies

Hello Dan,

cool. But

In[25]:= linearize[gamma + 3 x - beta z + 123 x y z]
Out[25]= gamma + 3 x

instead of

In[29]:= linF[gamma + 3 x - beta z + 123 x y z, {z, x, y}]
Out[29]= gamma + 3 x - beta z
POSTED BY: Hans Dolhaine

This is a variant of finding a total-degree based power series.

linearize[poly_] := Module[
  {vars = Variables[poly], t},
  Normal[Series[poly /. Thread[vars -> t*vars], {t, 0, 1}]] /. t -> 1
  ]

The example:

poly = 1 + x + y + z + x y + x y z;
linearize[poly]

(* Out[50]= 1 + x + y + z *)
POSTED BY: Daniel Lichtblau
POSTED BY: Frank Kampas

I will give a suggestion for a procedure which (attempts) to form a Taylor series for a function of several variables in another thread.

POSTED BY: Hans Dolhaine
Posted 6 years ago

Thanks so much. As Hans said, the code needs to check.

Regards, Omar

POSTED BY: Omar Alsuhaimi
POSTED BY: Hans Dolhaine
Posted 6 years ago
POSTED BY: Omar Alsuhaimi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard