Processing math: 0%
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 1 year ago

b@nnon.us gravatar image

Simple Piecewise limit?

Here's the question: lim where f\left(x\right)= 3 x+1, \quad x \neq-2 f\left(x\right) = 2, \quad x=-2

Here's the code:

reset()
x=var(’x’)
f1(x)=3*x+1
f2(x)=2
f(x)=piecewise([((-oo,-2),f1(x)),((-2,oo),f1(x)),([-2,-2],f2(x))])
limit(f(x),x=-2,algorithm="sympy")

Sage returns 2, but it should return -5. May someone please advise me on what I am doing wrong?