ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 27 Sep 2013 18:41:46 +0200Sage Calculus Tutorial -- continuity practice problemshttps://ask.sagemath.org/question/10572/sage-calculus-tutorial-continuity-practice-problems/Can anyone help me understand how to do some of the practice problems in the sage calculus tutorial? In particular, I'm stuck on problems 5 and on at the bottom of this page http://www.sagemath.org/calctut/continuity.html
For example, I am not sure how to define 'k'. As it stands, graphing the function in problem 5, sage does not know what to do with the variable 'k', because it is not defined. Fri, 27 Sep 2013 10:20:25 +0200https://ask.sagemath.org/question/10572/sage-calculus-tutorial-continuity-practice-problems/Answer by calc314 for <p>Can anyone help me understand how to do some of the practice problems in the sage calculus tutorial? In particular, I'm stuck on problems 5 and on at the bottom of this page <a href="http://www.sagemath.org/calctut/continuity.html">http://www.sagemath.org/calctut/conti...</a> </p>
<p>For example, I am not sure how to define 'k'. As it stands, graphing the function in problem 5, sage does not know what to do with the variable 'k', because it is not defined. </p>
https://ask.sagemath.org/question/10572/sage-calculus-tutorial-continuity-practice-problems/?answer=15498#post-id-15498You need to use the definition of continuity, which will involve the `limit` command, and the `solve` command to find `k`.
var('k')
solve(limit(3*x-2,x=k,dir='-')==limit(2*x+3,x=k,dir='+'),k)Fri, 27 Sep 2013 11:21:30 +0200https://ask.sagemath.org/question/10572/sage-calculus-tutorial-continuity-practice-problems/?answer=15498#post-id-15498Answer by tmonteil for <p>Can anyone help me understand how to do some of the practice problems in the sage calculus tutorial? In particular, I'm stuck on problems 5 and on at the bottom of this page <a href="http://www.sagemath.org/calctut/continuity.html">http://www.sagemath.org/calctut/conti...</a> </p>
<p>For example, I am not sure how to define 'k'. As it stands, graphing the function in problem 5, sage does not know what to do with the variable 'k', because it is not defined. </p>
https://ask.sagemath.org/question/10572/sage-calculus-tutorial-continuity-practice-problems/?answer=15496#post-id-15496To define the variable `k`, you can write:
sage: var('k')
k
Concerning problem 5, Sage does not answer the right result:
sage: solve(limit(cos(x), x=pi/2, dir='-') == limit(sin(x+k), x=pi/2 , dir='+'), k)
[k == 1/2*pi]
Indeed, `1/2*pi` is one of the solutions, but the solutions are all numbers of the form `1/2*pi+n*pi` (where `n` is an integer). So, you have to be careful with symbolic computations.
Fri, 27 Sep 2013 18:41:46 +0200https://ask.sagemath.org/question/10572/sage-calculus-tutorial-continuity-practice-problems/?answer=15496#post-id-15496