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.Thu, 10 Oct 2013 22:18:50 +0200Can sage be used to solve the following kind of problem?https://ask.sagemath.org/question/10604/can-sage-be-used-to-solve-the-following-kind-of-problem/"Given that f(1) = 9, f'(1) = 5, g(9) = 6 and g'(9) = 4, what is the approximate value of g(f(1.05))?"Thu, 10 Oct 2013 19:02:53 +0200https://ask.sagemath.org/question/10604/can-sage-be-used-to-solve-the-following-kind-of-problem/Answer by Shashank for <p>"Given that f(1) = 9, f'(1) = 5, g(9) = 6 and g'(9) = 4, what is the approximate value of g(f(1.05))?"</p>
https://ask.sagemath.org/question/10604/can-sage-be-used-to-solve-the-following-kind-of-problem/?answer=15536#post-id-15536You can just use the following script to do it. You construct two functions f and g such that they have a slope of 5 and 4 respectively and add a constant such that f(1) = 9 and g(9)=6 then evaluate at 1.05 using g(f(1.05)).
f(x)=5*x+4
g(x)=4*x-30
g(f(1.05))Thu, 10 Oct 2013 19:16:46 +0200https://ask.sagemath.org/question/10604/can-sage-be-used-to-solve-the-following-kind-of-problem/?answer=15536#post-id-15536Comment by kcrisman for <p>You can just use the following script to do it. You construct two functions f and g such that they have a slope of 5 and 4 respectively and add a constant such that f(1) = 9 and g(9)=6 then evaluate at 1.05 using g(f(1.05)).</p>
<pre><code>f(x)=5*x+4
g(x)=4*x-30
g(f(1.05))
</code></pre>
https://ask.sagemath.org/question/10604/can-sage-be-used-to-solve-the-following-kind-of-problem/?comment=16938#post-id-16938You could even use the differential equation solvers to solve these as initial value problems and stick it in... that said, this sounds like a Hughes-Hallett homework problem.Thu, 10 Oct 2013 22:18:50 +0200https://ask.sagemath.org/question/10604/can-sage-be-used-to-solve-the-following-kind-of-problem/?comment=16938#post-id-16938