20190712 15:17:42 0500  received badge  ● Popular Question (source) 
20190708 15:53:52 0500  answered a question  Generating integral solutions to a system of linear inequalities I'm not well versed in this kind of problems, but I thing that chapter 17 of this book should give you a head start. 
20190708 10:19:02 0500  commented question  absolute value for the ln function Well... 
20190706 11:37:03 0500  received badge  ● Nice Answer (source) 
20190706 10:27:55 0500  answered a question  Numerical integration and plot failing NOTE : This has replaced, (not complemented) my original answer concluding that this was a (Python) bug. Apologies for the confusion... As pointed out by Serge LeliÃ¨vre, this seems a limitation of Python 2 floats, which does not exist in Python 3, where one can do : See this sagedevel thread for further illumination... In the original example: 
20190704 02:09:22 0500  commented question  Need help converting python code to sage compatible This question deserves a new tag, such as 
20190704 02:03:27 0500  answered a question  Need help converting python code to sage compatible I do not understand what you're trying to accomplish (computing the nine billions names of God ?). I note that you are doing nothing with the result of For argument's sake, let's have a look at the size of problem. your elements are all the ninelong lists whose elements belong to How much time is necessary to compute one element ? Let's see : pick two elements at random and operate on them. Using your original definitions in a Python3based Sage : You would need about Storing the result (using an efficient encoding, i. e. two bits per element) but no previsible gain from string compressin algorithm (since your computation doesn't seem to have any special properties), you would need about 17.5 GB of storage. Therefore, absent any "interesting" properties of your May I suggest that using (a part of) 2.66 years to study the possible algebraic properties of your elements and operations might be more fruitful ? 
20190702 04:56:00 0500  answered a question  Octavelike plot function, or, how to plot sequence of points? sage: X = [1, 5, 7, 8, 8.7, 10, 13, 15] sage: Y = [2, 8, 13, 10, 9, 6.3, 2, 1] sage: points(zip(X,Y)) Launched png viewer for Graphics object consisting of 1 graphics primitive 
20190702 04:44:12 0500  commented question  computation time

20190701 05:06:47 0500  commented question  Numerical approximation Homework ? 
20190623 14:58:36 0500  answered a question  deleted ... Homework ? 
20190618 12:37:35 0500  commented answer  Is there any way we can use SageMath in the website as a Math Engine? The Web server software seems to have munched my answer irretrievably. Sorry... 
20190618 01:20:59 0500  answered a question  Is there any way we can use SageMath in the website as a Math Engine? That was the point of the old Sage notebook, now considered as unmaintainable. Attempts are done to interface Sagemath and Jupyterlab, which would allow such multiple interactions. Search for that in the sagedevel archives. IIRC, this will be much easier with a Python3based Sagemath. You can also develop a dedicated Web server using Sagemath as a backend. The real difficulty is to choose between a "singleshot" service (i. e. any Sagemath use is selfcontained) and a sessionbased service (i.e. queries at time t can use definitions and statements made at t'<t). in="" the="" first="" case,="" you="" use="" sagemath="" almost="" as="" a="" library,="" in="" the="" second="" case,="" your="" application="" must="" maintain="" its="" sessions="" (or,="" equivalently,="" launch="" one="" sagemath="" session="" per="" user.<="" p=""> HTH, 
20190616 02:45:04 0500  commented question  solve equation with two variables over RR A bug, IMHO... 
20190610 13:05:01 0500  commented question  roots of third degree polynomial Homework ? 
20190607 04:52:42 0500  answered a question  Problems and errors in solve an equation Okay. Time to think a bit. Let's try to solve this in SR, the symbolic ring. Let's get rid of the goddamn numeric constants : What's this ? Looks like a polynomial in omega. Let's check this : sage: LK=E2.expand().coefficients(omega); LK Hey ! it's indeed a polynomial of degree 4 in omega^2... Let's give its coefficients a more sy(nmpa)thetic name (i. e. create a simplertowrite polynomial having the same value given the right substitution) and check it : Transform this in a polynomial in omega^2 : Now, this fourthdegree polynomial has four (possibly equal, possibly complex) roots: Each of these solutions s for OmSq gives two possible solutions for omega (namely $\sqrt{s}$ and $\sqrt{s}$) : If one insists to reincorporate the goddamn numeric constants in the final solution, this is easy : Printing the solutions is left as an exercise for the (masochistic) reader (fitted with an A0 printer and lots of time). Similarly, checking them (by substitution in E2) is quite slow... An alternative (=more general (=better)) solution is to create a multivariate polynomial ring with the right unknowns (please choose easier names !) and compute the solutions by searching the "right" ideal. This would also allow you to create the set of roots without having to compute an explicit solution for them (which do not, in general, exists for degrees >=5). HTH, 
20190606 03:44:05 0500  commented question  Numerical integration and plot failing Indeed : Therefore, this function can be evaluated. But : ... not in A bug, IMHO 
20190527 07:27:17 0500  received badge  ● Good Answer (source) 
20190524 04:43:35 0500  received badge  ● Nice Answer (source) 
20190523 14:41:13 0500  commented answer  How to use `solve()` for a system of equations using matrices? POSTSCRIPTUM : It turns out that vectors have a list` method, that you can use to lighten the notations : Lighter and cleaner, indeed... 
20190523 14:23:44 0500  commented answer  How to use `solve()` for a system of equations using matrices?
Nope : But

20190523 09:51:26 0500  answered a question  How to use `solve()` for a system of equations using matrices? Try this : i. e. $$\left[\left[x_{1} = \frac{{a_{2,2}} y_{1}  {a_{1,2}} y_{2}}{{a_{1,2}} {a_{2,1}}  {a_{1,1}} {a_{2,2}}}, x_{2} = \frac{{a_{2,1}} y_{1}  {a_{1,1}} y_{2}}{{a_{1,2}} {a_{2,1}}  {a_{1,1}} {a_{2,2}}}\right]\right]$$. which looks entirely reasonable... HTH, 
20190522 15:38:58 0500  commented question  Formal determinant of symbolic matrix DanieleC : I agree. I misread/misunderstood the whishes of the anonymous OP. I'm not sure it makes sense... 
20190522 10:50:58 0500  commented question  Formal determinant of symbolic matrix You might be interested by this tutorial : the quaternions are a good example of a noncommutative ring. Matrices of such elements would have the properties you seek. You may find inspiration in this free textbook and its Sagemath supplement... Also, ISTR that Maxima allows you to define noncommutating sets of variables ; however, I have ni way to dive in its doc now, and I can't remember if it allows to define matrices of such elements... 
20190522 04:37:02 0500  received badge  ● Nice Answer (source) 
20190518 04:02:15 0500  received badge  ● Nice Answer (source) 
20190518 03:34:00 0500  commented answer  solve, indexes of solution variables are incrementing Same difference. RTFM again... 
20190518 01:17:21 0500  commented answer  solve, indexes of solution variables are incrementing No time to rerun your (heavy) program. But a cursory look makes me think that the problem might be with That I'd write RTFM... 
20190512 16:37:11 0500  answered a question  A goat in a tether Okay. After 12 days, your (hypothetic) homework is past due. Let's look at a couple of solutions. "when you're lost, draw what you know." Undergrads' wisdom. Let's see: Without loss of generality, set up a framework placing the fence center in $O=(0,0)$ and the tether anchor in $A=(r_0,0)$. In this framework a point $(x,y)$ is edible by the goat if it is :
In other words, the edible region is the intersection of two disks $D_0$, centered in $O$ with radius $r_0$ and $D_1$, centered in $A$ with radius $r_1$. This region can be exactly partitioned by the straight line segment joining the intersections of the two circles boundaries of these disks: Each of these regions is the intersection of a disk of radius $r$ and a halfplane cutting the disk at a distance $X<=r$ of its center. Therefore, a first, (almost) purely geometrical, solution to your problem is to derive the area of such a surface, and apply it to both the "yellow" and the "red" surfaces. Let's consider the "yellow" one, delimited bu th arc $B'AB$ and the straight segment $BB'$. This surface is symmetric about $OA$ ; therefore, its area is twice of the surface bounded by the arc $AB$ and the straight segments $BX$ and $XA$. This latter surface can be in turn considered as the difference between
Let's call $\theta$ the angle $\widehat{AOB}$. It can be determined from the position of $B$. We have of course $\cos\theta=\frac{OX}{r}=\frac{B_x}{r}$ and $\tan\theta={B_y}{B_x}$. At the high school level, this "determination" is a bit fuzzy, but will be clarified in first year of college... The circular sector has area $\frac{r^2\theta}{2}$, the triangle has area $\frac{OX*XB}{2}=\frac{B_x B_y}{2}$. The yellow surface has area twice their difference, therefore $r_0^2 \theta  B_x\cdot B_y$. For similar reasons (left to the reader as an exercise ; beware the signs !), with $\cos\theta_1=\frac{B_y}{r_1}$, the "red" sector has area $r_1^2\theta_1(r_0B_x) B_y$. All that is lacking are the coordinates of $B$ which are determined by the fact that it belongs to both the boundary circles (the fence and the tether). Since there are two solution points, we'll select the one with positive ordinate : That gives us $B=\left(\frac{2 \, r_{0}^{2}  r_{1}^{2}}{2 \, r_{0}},\ \frac{\sqrt{4 \, r_{0}^{2}  r_{1}^{2}} r_{1}}{2 \, r_{0}}\right)$. This also determines the angle $\theta=\widehat{AOB}$ by either Summing the partial areas and finding the root (value of $r_1$ leaving an edible area of 10 when $r_0=10$) is left as an exercise to the reader... This first answer will be edited by comparing it to an analytical solution using calculus (much easier, but with a surprise Sage bug...). EDIT : Now, an analytical solution using allsingin', alldancin' calculus. Let's consider an element of the "yellow" surface : an (infinitely) small vertical strip delimited bu the lines of equation $x=t$ and $x=t+dt$. The surface of this strip will be $(y_u(t)y_l(t))dt$, where $(t, y_l(t)$ and $(t, y_u(t)$ satisfy $E0$. The total "yellow" area will be the summation of such elemental areas from $t=X$ to $t=r_0$, i.e. $\displaystyle{\int_X^{r_0} (y_u(t)y_l(t)) dt}$. Our previous work already gave us $X$. We need to compute explicitly the bounds $y_l$ and $y_u$, and the integral: A couple notes:
For the same reasons, we can get the area of the "red" surface : which allows us to compute the expression of the edible fraction as a finction of the fence radius and the tether length : That is $$ \frac{\frac{{\left(2 \, \pi r_{0}  4 \, r_{0} arcsin\left(\frac{r_{1}}{2 \, r_{0}}\right)  \frac{\sqrt{4 \, r_{0}^{2}  r_{1}^{2}} r_{1}}{r_{0}}\right)} r_{1}^{2}}{r_{0}} + \frac{2 \, \pi r_{0}^{3} + 4 \, r_{0}^{3} arcsin\left(\frac{2 \, r_{0}^{2}  r_{1}^{2}}{2 \, r_{0}^{2}}\right)  2 \, \sqrt{4 \, r_{0}^{2}  r_{1}^{2}} r_{0} r_{1} + \frac{\sqrt{4 \, r_{0}^{2}  r_{1}^{2}} r_{1}^{3}}{r_{0}}}{r_{0}}}{400 \, \pi} $$ which looks reasonable: The numerical answer is immediate : One can check that trying to get the definite integral directly gives curious results :
Next installment : numerical integration :
Stay tuned... 
20190505 17:22:20 0500  answered a question  solve, indexes of solution variables are incrementing Those variables are generated by Maxima, which has non problem generating new symbols for (e. g.) integration constants or integers denoting the multiplicity of solutions. Those variables denoting arbitrary quantities, there is no reason for them to share names... One might note that other solvers (e. g. Sympy) may be less wasteful. A workaround is to collect the names of the variables appearing in the solution(s) and declare them as 
20190505 02:14:04 0500  commented question  A goat in a tether No answer to my previous question ? My hunch might have been right... Nevertheless, I'll throw a couple bones at you :

20190503 01:55:42 0500  commented question  Defining family of multivariable polynomials As you write them, your $p_k$ are firstdegrees polynomials of $n$ variables at most. Is that really what you want ? 