Ask Your Question

ron.bannon's profile - activity

2022-07-07 16:23:42 +0100 received badge  Famous Question (source)
2022-06-19 13:38:09 +0100 received badge  Nice Answer (source)
2020-04-15 05:25:48 +0100 received badge  Popular Question (source)
2020-04-15 05:25:48 +0100 received badge  Notable Question (source)
2016-07-20 15:43:05 +0100 received badge  Notable Question (source)
2015-06-05 14:56:02 +0100 received badge  Popular Question (source)
2014-09-05 01:56:30 +0100 commented question integrate(sin(x),x) doesn't work

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

2014-08-20 11:11:46 +0100 received badge  Nice Question (source)
2014-08-20 04:34:05 +0100 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 23:46:36 +0100 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-19 00:49:44 +0100 received badge  Student (source)
2014-08-18 22:11:18 +0100 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-09 04:18:08 +0100 commented question SageTeX and randint

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

2014-08-09 04:13:07 +0100 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 20:04:42 +0100 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)
sage: factor(8+27*x^3)
sage: latex(factor(8+27*x^3))
2014-08-08 20:01:07 +0100 commented question How to reset variables?

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

2014-08-08 15:35:56 +0100 received badge  Autobiographer
2014-08-08 15:08:09 +0100 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 10:14:34 +0100 received badge  Necromancer (source)
2014-08-08 10:14:34 +0100 received badge  Teacher (source)
2014-08-07 23:54:59 +0100 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.
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))

For example, we can now generate a random mathematical expression.
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)}
And then do some mathematics on them.
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)}

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

rSoln = solve( rQ3 == rQ2 , x)

The solution set is:

x_1 &=& \sage{rSoln[0].rhs()}\\
x_2 &=& \sage{rSoln[1].rhs()}
2014-08-07 16:27:33 +0100 received badge  Editor (source)
2014-07-23 15:48:18 +0100 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 version installed.

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

2014-07-22 05:59:55 +0100 answered a question interactive drawing and tikz

Take a look at Geogebra 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 of using Geogebra and ShareLaTeX to see how simple it is.