Post Reply 
CAS diff() giving incorrect results
09-26-2021, 12:04 PM (This post was last modified: 09-26-2021 04:42 PM by Albert Chan.)
Post: #11
RE: CAS diff() giving incorrect results
I thought that expression|(x=a) notation can be simulated with eval(subst(quote(expression), x=a))
But, not quite. subst version is better ! (I skipped eval, because f(x) not defined)

CAS> 'integrate(f(x),x)' (x = t*t

integrate(f(t*t)*(t+t),t)

CAS> 'integrate(f(x),x, 1, 2)' (x = t*t

integrate(f(t*t)*(t+t),t, 1, √2)


CAS> integrate(f(x),x) |x = t*t

x*f(t^2)

CAS> integrate(f(x),x, 1, 2) |x = t*t

integrate(f(x),x, 1, 2)

---

I may have found a quoting bug. If quoted expression is saved to a variable, quote is gone.

CAS> assume( t >= 0)
CAS> m := 'integrate(1/(√x*(x+1)),x)' (x = t*t)

integrate(1/(√(t*t)*(t*t+1))*(t+t),t)

CAS> m // should have matched Ans

2*atan(t)

Update: another bug, if we use notation x = a .. b

CAS> 'integrate(f(x),x = 1 .. 2)' (x = t*t

integrate(f(t*t),(t*t) = (1 .. 2))
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: CAS diff() giving incorrect results - Albert Chan - 09-26-2021 12:04 PM



User(s) browsing this thread: 1 Guest(s)