Ask Your Question

ron.bannon's profile - activity

2016-07-20 08:43:05 -0600 received badge  Notable Question (source)
2015-06-05 07:56:02 -0600 received badge  Popular Question (source)
2014-09-04 18:56:30 -0600 commented question integrate(sin(x),x) doesn't work

Try to reset Sage by typing reset(), then try the command again.

2014-08-20 04:11:46 -0600 received badge  Nice Question (source)
2014-08-19 21:34:05 -0600 asked a question Correct, but convoluted answer?

This absolute value inequality $$5\left| 2x-3\right| + 3 < 23$$ is satisfied when $$x \in \left( - \frac{1}{2}, \ \frac{7}{2} \right)$$. When I ask Sage to solve it, with this command

solve(5*abs(2*x-3)+3<23, x)

I get the same solution, but in a very convoluted way, as follows:

[[(-1/2) < x, x < (3/2)], [x == (3/2)], [(3/2) < x, x < (7/2)]]

Does this seem strange to anyone else?

2014-08-19 16:46:36 -0600 asked a question Wrong Answer?

When I ask Sage to solve a simple rational inequality it occasionally gives a wrong answer. For example, $$ \frac{x^2 - 9 }{x-3} \geq 0$$ is satisfied when $x \geq -3$ except at $x=3$, but Sage just gives $x \geq -3$. Here's the code I am using:

sage: solve((x^2-9)/(x-3) >= 0,x)
2014-08-18 17:49:44 -0600 received badge  Student (source)
2014-08-18 15:11:18 -0600 asked a question Graphing inequality on a number line?

I can certainly get the solution set for $x^2 - 9 \geq 0$, but how do I get this solution set visualized on a number line?

2014-08-08 21:18:08 -0600 commented question SageTeX and randint

Okay, I just inserted a reset() command before this call and it's now working. THANKS!

2014-08-08 21:13:07 -0600 commented answer Stange behavior in my scmd file.

Okay, I just inserted a reset() command before this call and it's now working. THANKS!

2014-08-08 13:04:42 -0600 asked a question Stange behavior in my scmd file.

I cannot figure this out! The diff command is working fine, by why are the following two commands not working as expected?

 sage: diff(sin(x^2),x)
2*x*cos(x^2)
sage: factor(8+27*x^3)
x^3
sage: latex(factor(8+27*x^3))
x^{3}
2014-08-08 13:01:07 -0600 commented question How to reset variables?

You can release a variable with this command: restore('r1')

2014-08-08 08:35:56 -0600 received badge  Autobiographer
2014-08-08 08:08:09 -0600 answered a question Problems running SageTex on OSX

I use $TeX$Shop and have written a guide about getting Sage$TeX$ to work. Certainly, $TeX$Maker is different, but I think looking over my guide may help.

2014-08-08 03:14:34 -0600 received badge  Necromancer (source)
2014-08-08 03:14:34 -0600 received badge  Teacher (source)
2014-08-07 16:54:59 -0600 asked a question SageTeX and randint

I can't seem to get this to work! I have a 40+ page $\LaTeX{}$ document with loads of embedded Sage, but when I enter the last section that uses a lot of randin(a, b) calls it causes much trouble. So I comment out the prior sections and then it works fine. I think it has something to do with the randint(a, b) calls.

\section{Randomized Test Generation}


If you're ever planning on creating a \emph{randomized} version of a mathematics test you may want to look over the code in this section. Although random here does not mean that each version will be equal in its level of difficulty, but it is a good way to randomize a test bank of questions.

%Okay, these are pretty simple random calls to create three random polynomials with integer coefficients.
\begin{sagesilent}
rA = Integer(randint(1,3))
rB =Integer(randint(2,4))
rC =Integer(randint(3,5))
rD =Integer(randint(4,6))
rE =Integer(randint(5,7))
rF =Integer(randint(6,8))
rG =Integer(randint(7,9))
rH =Integer(randint(8,10))
rQ1 = expand((rA*x - rE)*(rC*x - rD))
rQ2 = expand((rB*x + rF)*(rH*x - rG))
rQ3 = expand((rC*x + rG)*(rA*x + rE))
\end{sagesilent}


For example, we can now generate a random mathematical expression.
\begin{eqnarray*}
A &=& \sage{rA}\\
B &=& \sage{rB}\\
C &=& \sage{rC}\\
D &=& \sage{rD}\\
E &=& \sage{rE}\\
F &=& \sage{rF}\\
G &=& \sage{rG}\\
H &=& \sage{rH}\\
f\left( x \right) &=& \sage{rQ1} = \sage{factor(rQ1)}\\
g\left( x \right) &=& \sage{rQ2} = \sage{factor(rQ2)}\\
h\left( x \right) &=& \sage{rQ3} = \sage{factor(rQ3)}
\end{eqnarray*}
And then do some mathematics on them.
\begin{eqnarray*}
f\left( x \right) \cdot g\left( x \right) &=& \sage{expand( rQ1 * rQ2 )}\\
\int_1^2 f\left( x \right) \, {\rm{d}} x &=& \sage{integrate( rQ1, x, 1, 2)}\\
\frac{{\rm{d}}}{{\rm{d}} x}       \left(\sage{rQ2} \right) \left( \sage{rQ3} \right) &=& \sage{expand(diff(rQ2 * rQ3, x)) }\\
\frac{{\rm{d}}}{{\rm{d}} x}       \left[ \frac{x}{\sage{rQ2}} \right] &=& \sage{diff(x / rQ1, x) }\\
\sage{ rA * rB * rC * rD * rE * rF * rG * rH} &=& \sage{factor(rA * rB * rC * rD * rE * rF * rG * rH)}
\end{eqnarray*}

Or set-up some random equation to solve.
\begin{eqnarray*}
\sage{rQ3} = \sage{rQ2}
\end{eqnarray*}

\begin{sagesilent}
rSoln = solve( rQ3 == rQ2 , x)
\end{sagesilent}

The solution set is:

\begin{eqnarray*}
x_1 &=& \sage{rSoln[0].rhs()}\\
x_2 &=& \sage{rSoln[1].rhs()}
\end{eqnarray*}
2014-08-07 09:27:33 -0600 received badge  Editor (source)
2014-07-23 08:48:18 -0600 answered a question Problems with Sagetex under Texshop

Open this folder ~/Library/TeXShop/Engines/Inactive/Sage/ and follow the instructions in About Sage.pdf and all should work fine. Make sure you have the Sage.app version installed.

For $TeX$Shop users needing more assistance, I have written a ~50 page guide that should help.

2014-07-21 22:59:55 -0600 answered a question interactive drawing and tikz

Take a look at Geogebra http://www.geogebra.org. You basically have a app that works like a calculator, and you can export your graphs to LaTeX PGF/TikZ. You may want to look at a demo https://www.youtube.com/watch?v=beUSEBoci5c&list=UUiaUNF5GUwJ8owZq5Qgw0ZA of using Geogebra and ShareLaTeX to see how simple it is.