Skip to main content
21-Topaz II
September 4, 2019
Question

Polynomial, yes or not?

  • September 4, 2019
  • 3 replies
  • 5905 views

Hello everyone,

I would like to create a Mathcad program that distinguishes whether the denominator of a given fraction is a polynomial or not, returning 0 or 1 for example. How do I do this?

Thank you.

3 replies

23-Emerald IV
September 4, 2019
Examples please.
Note sin (x) generally isn't viewed as a polynomial in x. But it can be written as such.

Luc
-MFra-21-Topaz IIAuthor
21-Topaz II
September 4, 2019

Hi,

The function of the program should be something like this:

Funtype.jpg

once the type has been identified, we pass to the transformation into a polynomial, if possible.

23-Emerald IV
September 4, 2019

I got this far, so far:

LM_20190904_CheckPolynome.png

I doubt whether this will (rather sure that this will not) work in Mathcad 15, but it does work in Mathcad 11.

Success!
Luc

-MFra-21-Topaz IIAuthor
21-Topaz II
September 5, 2019

Mathcad 15 returns this error:

LM file.jpg

25-Diamond I
September 4, 2019

I am tempted to say that what you demand can't be done in Mathcad in a reasonable way as Mathcad does not provide the necessary tools.

Nonetheless here is a first attempt which may serve as a starting point for your own experiments.

There are a lot of drawbacks so far - you can only evaluate the function symbolically, its only working for functions in one variable and otherwise constants, ...

A few of the adverse effects could probably be corrected by some further investigations, but presumably not all. And I guess it will remain an uncertain, unreliable thing.

B.png

-MFra-21-Topaz IIAuthor
21-Topaz II
September 5, 2019

it would be better if the circled functions are not considered an error by mathcad. How to do?

WE file.jpg

23-Emerald IV
September 5, 2019

I don't think there is a way.

You can switch off signalling of certain (types of) warnings.

You cannot switch off errors.

 

Luc