Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As John said,

sage: f = e^x + x
sage: plot(f, x, -1, 1)
sage: diff(f, x).subs(x=0)
2
sage: f.subs(x=0)
1
sage: g = 2*x + 1
sage: plot(f, x, -2, 2) + plot(g, x, -2, 2, color='red')

![Plot of e^x+x and 2*x+1][1]

The line is $y = 2x + 1$.

click to hide/show revision 2
Images don't work in the code boxes.

As John said,

sage: f = e^x + x
sage: plot(f, x, -1, 1)
sage: diff(f, x).subs(x=0)
2
sage: f.subs(x=0)
1
sage: g = 2*x + 1
sage: plot(f, x, -2, 2) + plot(g, x, -2, 2, color='red')

![Plot of e^x+x and 2*x+1][1]

The line is $y = 2x + 1$.

Plot of e^x+x and 2*x+1