Skip to content

Maxima's demoivre() doesn't work with hyperbolic functions. #24231

@EmmanuelCharpentier

Description

@EmmanuelCharpentier

A nice one :

sage: [(t,t(x)._maxima_().exponentialize().demoivre().sage()) for t in [sin,cos,
....: tan,sinh,cosh,tanh]]

[(sin, sin(x)),
 (cos, cos(x)),
 (tan, sin(x)/cos(x)),
 (sinh, -1/2*e^(-x) + 1/2*e^x),
 (cosh, 1/2*e^(-x) + 1/2*e^x),
 (tanh, -(e^(-x) - e^x)/(e^(-x) + e^x))]

This is a Maxima problem :

(%i5) map(lambda([t],[t,demoivre(exponentialize(t(x)))]),[sin,cos,tan,sinh,cosh,tanh]);

(%o5) [[sin,sin(x)],[cos,cos(x)],[tan,sin(x)/cos(x)],[sinh,(%e^x-%e^-x)/2],
       [cosh,(%e^x+%e^-x)/2],[tanh,(%e^x-%e^-x)/(%e^x+%e^-x)]]

One also notes that sin(x)/cos(x) is not simplified in tan(x).

Reported on this ask question.

Related Maxima discussions:

Upstream: Reported upstream. Developers deny it's a bug.

CC: @slel

Component: symbolics

Keywords: maxima, demoivre, cosh, sinh

Reviewer: Emmanuel Charpentier, Samuel Lelièvre

Issue created by migration from https://trac.sagemath.org/ticket/24231

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions