C_R

4009 Reputation

21 Badges

7 years, 0 days

MaplePrimes Activity


These are questions asked by C_R

Sometimes I miss appropriate tags. How and to whom can I make a suggestion?

How to revert ("unapply") a function composition application?
Example:

`@`(ln, sinh)

`@`(ln, sinh)

(1)

apply(`@`(ln, sinh), x)

ln(sinh(x))

(2)

Unapply does not do the opposite of what apply does

unapply(ln(sinh(x)), x)

proc (x) options operator, arrow; ln(sinh(x)) end proc

(3)

What I am instered in: revert/undo the apply operation leading to(2) and returning the corresponding function composition of (1).

Maybe there is a convert function that I have overlooked.NULL

Download revert_application_of_function_composition.mw

I could not figure out why Maple does not return tanh. Instead a complex valued function for real arguments is returned. This is not recent. I tried down to Maple 2020.  Is that correct?

 

D(tanh);
plot(%)

-tanh^2+1

 

 

int(D(tanh)(x),x);# I expected tanh
plot(%);# ok, no plot for real valued x

x+tanh(x)+(1/2)*ln(tanh(x)-1)-(1/2)*ln(tanh(x)+1)

 

Warning, unable to evaluate the function to numeric values in the region; complex values were detected

 

int(D(tanh)(x),x=0..infinity);# this result seems to be known in advance and fits to the above plot

1

(1)

int(D(tanh)(x),x=a..b);
eval(%,[a=0,b=infinity]);# I expected 1 from (1)
eval(%%,[a=0,b=50.]);# retruns complex for small values

-a-tanh(a)-(1/2)*ln(tanh(a)-1)+(1/2)*ln(tanh(a)+1)+b+tanh(b)+(1/2)*ln(tanh(b)-1)-(1/2)*ln(tanh(b)+1)

 

Error, (in ln) numeric exception: division by zero

 

-Float(infinity)-((1/2)*I)*Pi

(2)

evalf(int(D(tanh)(x),x=0..50))

1.000000000

(3)

Let's try integrating the identical expression sech^2

 

tanh(x)

(4)

is((sech^2=1-tanh^2)(x));# check identity

true

(5)

int(sech(x)^2,x);# what I expected

tanh(x)

(6)

Download Integrating_D_tanh.mw

After starting Maple

I then tried simpler prompts like "Hello", simplify(x),...

For all prompts I get the same error message.
I am not a frequent AI user but this is the first time I see that.
Has anybody else experienced the same?

Can someone send me a prompt that should work?

(Model type was Simple.)

Update:

It seems that this error occurs, when a second instance of Maple 2026.1 is started and AI is consulted in this instance. 

To D(ln@cosh) I have to add an argument to make it work (Edit: no output returned):

D(ln@cosh)(x);
                            sinh(x)
                            -------
                            cosh(x)

According to ?D I expected output according to this

1 2 3 4 5 6 7 Last Page 1 of 56