I am trying to substitute a function in a complicated expression, and i get the above error message
An example:
n10:=(phikp((x - xf0 - xs0)/sqrt( - u0**2 + 1))**2*u0**2 - phikp((x - xf0 - xs0)/sqrt( - u0**2 + 1))**2 - phikpp(( - t*u0 + x - xs0)/sqrt( - u0**2 + 1))**2*u0**2)/(1: u0**2 - 1); let phik1(~x)=>4*atan(e**(s*x)); let phik1p(~x)=>df(4*atan(e**(s*x)),x); n10 where {phik(~xi)=>phik1(xi), phikp(~xi)=>phik1p(xi) };
this gives the error message
***** (quotient (plus x (minus xf0) (minus xs0)) (sqrt (plus (minus (expt u0 2)) 1))) invalid as kernel or integer ***** Invalid simplification
This is a user error, namely trying to differentiate with respect to a non-kernel, as I have explained in a separate message.
You are trying to differentiate with respect to an expression, namely the argument of phik1p when it gets applied. I think what you mean is this:
let phik1p(~x)=>sub(!!x=x, df(4atan(e(s!!x)),!!x));
and then the computation should work (provided you remove the spurious “1:” from the value of n10). The !!x I have introduced is just an identifier with an obscure name that I hope is unbound.
I don’t see any problem with REDUCE so I will close the ticket.
Francis
From: arpi lukacsarpad@users.sourceforge.net
Sent: Friday, 12 February 2021 7:47 pm
To: Ticket #131: Invalid simplification error message 131@bugs.reduce-algebra.p.re.sourceforge.net
Subject: [reduce-algebra:bugs] #131 Invalid simplification error message
[bugs:#131]https://sourceforge.net/p/reduce-algebra/bugs/131/ Invalid simplification error message
Status: open
Group:
Created: Fri Feb 12, 2021 07:46 PM UTC by arpi
Last Updated: Fri Feb 12, 2021 07:46 PM UTC
Owner: nobody
I am trying to substitute a function in a complicated expression, and i get the above error message
An example:
n10:=(phikp((x - xf0 - xs0)/sqrt( - u02 + 1))2u02 - phikp((x - xf0 - xs0)/sqrt( - u02 + 1))2 - phikpp(( - t*u0 + x - xs0)/sqrt( - u02 + 1))2*u02)/(1: u0*2 - 1);
let phik1(~x)=>4atan(e(sx));
let phik1p(~x)=>df(4atan(e(sx)),x);
n10 where {phik(~xi)=>phik1(xi), phikp(~xi)=>phik1p(xi) };
this gives the error message
* (quotient (plus x (minus xf0) (minus xs0)) (sqrt (plus (minus (expt u0 2)) 1))) invalid as kernel or integer
* Invalid simplification
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/reduce-algebra/bugs/131/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs:
#131Thank you for your explanation. I think I understood that the problem was trying to differentiate w.r.t. a non-kernel, I just did not realise there's this ingenious way to put the right thing in the rule. I was looking for some way to "evaluate" the derivative, and put that formula in the rule, and did not find one.