Strange behaviour in simplifying a function

asked 2020-05-21 19:57:45 +0200

Cyrille gravatar image

updated 2020-05-21 21:00:25 +0200

slelievre gravatar image

I am developping a long notebook to master Sage. But each time I fall on a problem. This time

p, D, w_0, x, I = var('p, D, w_0, x, I')
β = var('beta')
π = var('pi') 
A = matrix(SR, 2, 2, [[w_0, 1],[w_0-π,1]])
y = vector([w_0-D, w_0-D-π+I])
sola=sol[0].full_simplify().function(D, π, w_0)
solb=sol[1].full_simplify().function(D, π, I, w_0)
f=(sola*x + solb).function(x, D, π, I, w_0)
g=f(x, D, β*I*(1-p), I, w_0).factor().collect(x).simplify().function(x, D, β, p, w_0)
h(x, D, p, w0)=g(x, D, 1, p, I, w_0).collect(D).collect(x).simplify()

1) this is the main question : You can observe that g is independanr of I. But h is g with $\beta = 1$. So why I does reappear in h ?

2) How could we explain SM to write the slope of the 3 curves as I would write them in a sheet of paper ?

edit retag flag offensive close merge delete


g is a function of 5 arguments, but you are passing 6, including the parameter I.

mwageringel gravatar imagemwageringel ( 2020-05-22 09:55:02 +0200 )edit

Thanks some time I would like to put aways my stupid questions.

Cyrille gravatar imageCyrille ( 2020-05-22 11:52:31 +0200 )edit