Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Taylor expansion assumptions

This is a very simply question, but I can't seem to get an appropriate answer in Sage. Let's say I have the following function:f(x,y,z)=sqrt(x^2+(y+1-z)^2). The taylor expansion around x=0 is sqrt((y+1-z)^2)+x^2/(2*sqrt((y+1-z)^2)). Is it possible for Sage to take assumptions into account when expanding? For example, if I have assume(y>0,z>0,z>y+1), then clearly, (y+1-z)<0, so when simplifying, sqrt((y+1-z)^2)=z-y-1. However, Sage simply gives me the same answer regardless of assumption. Is there a way to fix this?

Taylor expansion assumptions

This is a very simply question, but I can't seem to get an appropriate answer in Sage. Let's say I have the following function:f(x,y,z)=sqrt(x^2+(y+1-z)^2). The taylor expansion around x=0 is sqrt((y+1-z)^2)+x^2/(2*sqrt((y+1-z)^2)). sqrt((y+1-z)^2)+x^2/(2*sqrt((y+1-z)^2)) (analytic form, not the value Sage gives). Is it possible for Sage to take assumptions into account when expanding? For example, if I have assume(y>0,z>0,z>y+1), then clearly, (y+1-z)<0, so when simplifying, sqrt((y+1-z)^2)=z-y-1. However, Sage simply gives me the same answer regardless of assumption. Is there a way to fix this?

Taylor expansion assumptions

This is a very simply question, but I can't seem to get an appropriate answer in Sage. Let's say I have the following function:f(x,y,z)=sqrt(x^2+(y+1-z)^2). The taylor expansion around x=0 is sqrt((y+1-z)^2)+x^2/(2*sqrt((y+1-z)^2)) (analytic form, not the value Sage gives). Is it possible for Sage to take assumptions into account when expanding? For example, if I have assume(y>0,z>0,z>y+1), then clearly, (y+1-z)<0, so when simplifying, sqrt((y+1-z)^2)=z-y-1. However, Sage simply gives me the same answer regardless of assumption. Is there a way to fix this?

Taylor expansion assumptions

This is a very simply question, but I can't seem to get an appropriate answer in Sage. Let's say I have the following function:f(x,y,z)=sqrt(x^2+(y+1-z)^2). The taylor expansion around x=0 is sqrt((y+1-z)^2)+x^2/(2*sqrt((y+1-z)^2)) (analytic form, not the value Sage gives). Is it possible for Sage to take assumptions into account when expanding? For example, if I have assume(y>0,z>0,z>y+1), then clearly, (y+1-z)<0, so when simplifying, sqrt((y+1-z)^2)=z-y-1. However, Sage simply gives me the same answer regardless of assumption. Is there a way to fix this?