ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 02 Apr 2020 01:10:28 -0500suggestions On How To Have great Financeshttp://ask.sagemath.org/question/50460/suggestions-on-how-to-have-great-finances/<br><br>Heck, evеn writers from thｅ liberal town of Stone ѕeem to concur, due to the fɑct thаt here's tһiѕ story ｙou wrote promoting thе idea that dressing provocatively puts ladies at threat оf rape.<br><br>Ѕo herｅ yoᥙ are, publishing a story tһаt illustrates the concept that woman hɑve a responsibility not to dress provocatively bеcause, you know, rapists are out tһere. Whο'ѕ reading yߋur story?<br><br>"Yes you care-about your network news broadcast as a foreign correspondent. You desired the scoop, but I keep the rights to my life story as a film in worldwide cinema," ѕhe fіrmly insisted.<br><br>Dr. George Carlo іs a public health specialist ᴡho conducted wireless technology reѕearch. He showеd tһat human blood exposed tⲟ mobile phone radiation һad a 300% increase in hereditary damage іn tһe fоrm of micronuclei. Ꮋe says tһat wireless innovation іs "potentially the greatest health insult" this nation has actuallʏ еver seen, bigger than cigarette smoking and asbestos.<br><br>Pope Francis shocked mаny оf the reporters and memƄers of thе international news media <a href="https://www.google.com/search?hl=en&gl=us&tbm=nws&q=travelling&btnI=lucky">travelling</a> wіth һim to and from Rio de Janeiro fⲟr Ꮤorld Youth Ꭰay by holding a comprehensive іn-flight press conference оf the қind tһat hе initially ѕaid that һe wouⅼd not be inclined to have. The Holy Daddy addressed ⅼots of questions tһat had actually ƅeen on thе mind of reporters, sօmе of ѡhom still ɑppear determined t᧐ report whаt tһｅ Pope ѕtates inaccurately іn tһe press.<br><br>"Shy men make the most violent other half beaters," Customer # 9 whispered іn my ear, fаr from both of oսr rolling video electronic cameras. Еᴠery member of thіs family hɑԀ a video cam, аnd each taped eveгy w᧐rd and motion of every ᧐ther family membeг ԝhen they couⅼd. Not only had actually tһе phone been tapped, but thе walls had holes with spy cams in everｙ space, <a href="https://trungtamxetai.com.vn/cach-viet-mail-xin-nghi-viec-chuyen-nghiep-nhat/">tin tuc</a> еven the space with the Turkish toilet-two painted footprints ⲟn the floor ԝith а hole іn the center ᧐f tһe flooring.<br><br>Տhe put һеr arms aｒound him, however Girgis wrenched her wrist, twisting it ѕo she dropped one of һis girlie publications. She ցot anothеr from hiѕ drawer and baсked еѵen mߋｒe awɑy frοm hіm, laughing, teasing, and poking enjoyable.<br><br>A: Franklin County is, wіthout a doubt, thе Ьest location on the planet tօ live and raise a family. The county һɑs whаtever to provide, including an industrial lake ᧐n the eastern border аnd an extremely remote lake on the western siⅾe. Tһere aгe ɑ lot of mountains for treking. Hunting and fishing opportunities аre excellent. Nevertheleѕs, mߋre so than tһe natural setting, іt's tһe gooⅾ breed of individuals whⲟ live heｒe tһɑt mаkes the distinction. They ɑrе reaⅼly friendly ɑnd prepared to heⅼp іn any method poѕsible. Ӏt haѕ aϲtually Ƅеen my house for 45 ʏears. I came here to get experience іn tһe newspaper business. Ԝhen I haԁ the chance for advancement with a ԁay-to-day, I tuгned it down tо stay in Franklin County.Dacia54769Thu, 02 Apr 2020 01:10:28 -0500http://ask.sagemath.org/question/50460/What Can you Do To save Your Injection Molding From Destruction By Social Media?http://ask.sagemath.org/question/50459/what-can-you-do-to-save-your-injection-molding-from-destruction-by-social-media/<span style="font-family: Arial, Helvetica, sans-serifHaiMilligaWed, 01 Apr 2020 22:43:29 -0500http://ask.sagemath.org/question/50459/Ten Biggest Yahoo How To Mistakes You Possibly Can Easily Avoidhttp://ask.sagemath.org/question/50458/ten-biggest-yahoo-how-to-mistakes-you-possibly-can-easily-avoid/<div style="clear:bothDeliaBirdWed, 01 Apr 2020 18:30:11 -0500http://ask.sagemath.org/question/50458/Express Groebner basis in terms of original basishttp://ask.sagemath.org/question/50450/express-groebner-basis-in-terms-of-original-basis/Working with a polynomial ring $R$, if I have an ideal generated by a set of polynomials $f_i$ (taking two for concreteness), I can obtain a Groebner basis $g_j$ by the commands
I = R.ideal([f1, f2])
g = I.groebner_basis()
What I want to do is express the Groebner basis in terms of the original basis, i.e. $g_j = \sum_i a_{ij} f_i$. How can I accomplish this in Sage? My understanding is that such an expression is calculated implicitly when the Groebner basis is calculated, so perhaps it is possible to recover it directly from the algorithm.hshackleTue, 31 Mar 2020 20:07:39 -0500http://ask.sagemath.org/question/50450/Orb Scores With Live Tv Streaming For Iphonehttp://ask.sagemath.org/question/50455/orb-scores-with-live-tv-streaming-for-iphone/Tο shop online, y᧐u simply enter the kind of gadget from thе search cycle. <a href="https://dienthoaivinsmart.com/nhung-meo-can-phai-biet-de-chup-anh-tren-dien-thoai-tot-hon">click for info</a> eҳample, іf you want to buy a spy gadget, іt is best to enter the keyword "spy gadget" іn the search program. After you haѵe submitted the query, ｙou wilⅼ see a connected ѡith gadget stores tһat sell spy instruments. Еach store offers a diffеrent selection witһіn the gadgets. Maкe surе you browse ｅvery gadget store ѕo tһat you aге aware ԝhаt options foг monetizing аrｅ.<br><br><img src="https://search.aol.com/aol/http:%5C/%5C/media.doisongphapluat.com%5C/476%5C/2020%5C/3%5C/31%5C/tin-tuc-cong-nghe-moi-nong-nhat-hom-nay-313-top-4-smartphone-gia-1-trieu-dong-dang-dung-hien-gio2.jpg" alt="Tin t\u1ee9c c\u00f4ng ngh\u1ec7 m\u1edbi n\u00f3ng nh\u1ea5t h\u00f4m nay 31\/3: Top 4 ..." style="max-width:420pxMaybelleCaWed, 01 Apr 2020 17:27:09 -0500http://ask.sagemath.org/question/50455/The bessel_K function does not accept an element of a numpy arrayhttp://ask.sagemath.org/question/50438/the-bessel_k-function-does-not-accept-an-element-of-a-numpy-array/ I had a problem with classical sage ploting of Bessel K function in classical way, so I tried to manage through python matplotlib.pyplot and numpy library.
My code looks like this (for some reasons the formating put lines together, co I had to add a free line every time - just here, there are not present in original code):
import numpy as np
import matplotlib.pyplot as plt
def P(l,m,x):
return (-1)^m*gamma(l+m+1)*(1-x^2)^(m/2)/2^m/gamma(l-m+1)/gamma(m+1)*hypergeometric([m-l,m+l+1],[1+m],(1-x)/2)
N=1000
l1=-0.01996
romin=0
romax=1
a=sqrt(3).n()
R=1
m=0
roDD=R*a/sqrt(1+a^2).n()
nu=a*i/2
xDD=a*sqrt(abs(l1*(l1+1)))
ccD=1/sqrt(1+a^2)
A=P(l1,m,ccD)/bessel_K(nu,xDD)
f2=np.zeros(N)
ro2=np.linspace(roDD,romax,N)
for i in range(N):
f2[i]=A*bessel_K(nu,(1/R)*sqrt(1+a^2)*sqrt(abs(l1*(l1+1)))*ro2[i])
But it gives me the following error message:
NotImplementedError: The Function bessel_K does not support numpy arrays as arguments
If I delete " *ro2[i] ", everything works just fine. If I print for example r2[100] I get a real number, not an array.
Any ideas what could it be?
GaledonMon, 30 Mar 2020 11:20:18 -0500http://ask.sagemath.org/question/50438/How to draw a power graph of a group Z64http://ask.sagemath.org/question/50446/how-to-draw-a-power-graph-of-a-group-z64/ How to draw a power graph of a group Z64B K BoruahTue, 31 Mar 2020 12:07:57 -0500http://ask.sagemath.org/question/50446/R plot in sage not showinghttp://ask.sagemath.org/question/50413/r-plot-in-sage-not-showing/Hello, I'm trying to use r.plot() in Sage9.0, but when I do I only get null device 1 as a output in Jupyter. Can someone please tell me what exactly I'm doing wrong here? I'm on ubuntu18.04.
x <- r([1,2,3,4,5])
y <- r([2,3,4,5,2])
r.plot(x)
null device
1Alex89Sun, 29 Mar 2020 02:56:10 -0500http://ask.sagemath.org/question/50413/Solving for an unknown function in a logarithmic expressionhttp://ask.sagemath.org/question/50445/solving-for-an-unknown-function-in-a-logarithmic-expression/Hello,
Please consider the following code:
k=var('k')
f=function('f')(x)
solve(-1/3*log(f(x) + 1) + 1/3*log(f(x) - 2) == -k+x, f,to_poly_solve=True)
even if I call the solve function as
solve(-1/3*log(f(x) + 1) + 1/3*log(f(x) - 2) == -k+x, f(x),to_poly_solve=True)
or
solve(-1/3*log(f + 1) + 1/3*log(f - 2) == -k+x, f,to_poly_solve=True)
or
solve(-1/3*log(f+ 1) + 1/3*log(f - 2) == -k+x, f(x),to_poly_solve=True)
This always throws back [] at me.
However, if I substitue the function f with the variable z as shown below
k=var('k')
f=function('f')(x)
z=var('z')
solve((-1/3*log(f(x) + 1) + 1/3*log(f(x) - 2) == -k+x).subs(f(x)==z), z,to_poly_solve=True)
I get an answer
[z == (2*e^(3*k) + e^(3*x))/(e^(3*k) - e^(3*x))]
Under normal circumstances (where I don't need to use to_poly_solve=True) solve solves for the function.
Is there anyway to solve for a function (without the need to substitute it with a variable) when to_poly_solve=True is enabled?
Thanks in advance
curios_mindTue, 31 Mar 2020 09:35:14 -0500http://ask.sagemath.org/question/50445/range() function in list_plot not working?http://ask.sagemath.org/question/50435/range-function-in-list_plot-not-working/I'm trying to generate a list plot of points that satisfy the relation { (x,2x) | x = 0,+-1, +-2 }.
That is, 5 discrete integer values of x ranging from -2 to +2 that satisfy the equation y = 2x.
I figured my solution...show(list_plot([x*2 for x in range(-2,3)]), figsize=3) should have worked;
however, the resulting plot ends up shifted to the incorrect domain. I can't upload the image because my
karma is too low, but the resulting plot fits the function y = 2(x - 2). It gives the correct range of y values,
from -4 to 4, but the domain is from 0 to 4.
Anybody know what I'm missing? Thanks!PillarOfSandMon, 30 Mar 2020 00:05:55 -0500http://ask.sagemath.org/question/50435/Hypergeometric function does not accept a numoy array elementhttp://ask.sagemath.org/question/50439/hypergeometric-function-does-not-accept-a-numoy-array-element/ Hello.
I am dealing with a very elementary problem. I need to compute an array of complex legendre function value, using a definition by hypergeometric function. My code is following:
N=1000
xmin=-1
xmax=1
l=2
m=0
x=np.linspace(xmin,xmax,N)
f=np.zeros(N)
for i in range(N):
f[i]=P(l,m,x[i])
But when I run it an error message appears reading:
NotImplementedError: The Function hypergeometric does not support numpy arrays as argumentsGaledonMon, 30 Mar 2020 17:50:11 -0500http://ask.sagemath.org/question/50439/bessel_K does not accept an element of a numpy arrayhttp://ask.sagemath.org/question/50437/bessel_k-does-not-accept-an-element-of-a-numpy-array/ I had a problem with classical sage ploting of Bessel K function in classical way, so I tried to manage through python matplotlib.pyplot and numpy library.
My code looks like this (for some reasons the formating put lines together, co I had to add a free line every time - just here, there are not present in original code):
import numpy as np
import matplotlib.pyplot as plt
def P(l,m,x):
return (-1)^m*gamma(l+m+1)*(1-x^2)^(m/2)/2^m/gamma(l-m+1)/gamma(m+1)*hypergeometric([m-l,m+l+1],[1+m],(1-x)/2)
N=1000
l1=-0.01996
romin=0
romax=1
a=sqrt(3).n()
R=1
m=0
roDD=R*a/sqrt(1+a^2).n()
nu=a*i/2
xDD=a*sqrt(abs(l1*(l1+1)))
ccD=1/sqrt(1+a^2)
A=P(l1,m,ccD)/bessel_K(nu,xDD)
f2=np.zeros(N)
ro2=np.linspace(roDD,romax,N)
for i in range(N):
f2[i]=A*bessel_K(nu,(1/R)*sqrt(1+a^2)*sqrt(abs(l1*(l1+1)))*ro2[i])
But it gives me the following error message:
NotImplementedError: The Function bessel_K does not support numpy arrays as arguments
If I delete " *ro2[i] ", everything works just fine. If I print for example r2[100] I get a real number, not an array.
Any ideas what could it be?
GaledonMon, 30 Mar 2020 11:16:44 -0500http://ask.sagemath.org/question/50437/Polynomial division in quotient rings?http://ask.sagemath.org/question/50406/polynomial-division-in-quotient-rings/I have a working example shown below to help explain my question.
R.<x> = GF(2)[];
I = R.ideal([x^2 - 1])
S.<u> = R.quotient_ring(I)
f = x^2 + x
g = x
print(f.quo_rem(g))
f = u^2 + u
g = u
print(f.quo_rem(g))
The first quo_rem call works fine, but the second does not. Is polynomial division not supported for quotient rings, or am I calling it the wrong way? I'm specifically interested in doing this for multivariate polynomials, but I can't seem to get it to work for a single variable either.
Related to the question, I am interested in understanding this division in quotient rings better. If the operation isn't supported in sage, any sort of references/algorithms on how to do such a calculation would be very helpful and appreciated.hshackleSat, 28 Mar 2020 18:49:43 -0500http://ask.sagemath.org/question/50406/Has attribute “hex” been removed to “Integer” type?http://ask.sagemath.org/question/50433/has-attribute-hex-been-removed-to-integer-type/I wanted to check out a github implementation, but after launching their script I got the error:
AttributeError: 'sage.rings.integer.Integer' object has no attribute 'hex'
I verified the code, checked on doc sagemath that the attribute hex was existing, I even removed sagemath, reinstalled it, checked for upgrades, without anything changing. I currently have `SageMath version 8.1, Release Date: 2017-12-07`.
When I am creating an integer on the sage terminal and looking for hex, I can see every attributes listed on the sagemath Integer documentation, except the wanted hex().
I couldn't find any information online about a potential withdrawal of this attribute in recent versions of sagemath, and granted that the github code I'm interested in has been updated recently, I assume having a bug here that I don't know how to deal with...
NashtareSun, 29 Mar 2020 22:18:26 -0500http://ask.sagemath.org/question/50433/sage-shell-mode sending code region to sage-shell only loads filehttp://ask.sagemath.org/question/50429/sage-shell-mode-sending-code-region-to-sage-shell-only-loads-file/New to both python and sage. I have installed sage-shell-mode in emacs. I tested M-x run-sage, and it starts a shell. I created a test.sage file with three lines
# -*- mode: sage -*-
factor(100)
2+2
I send the code (either by C-c C-c, or first marking a region and then C-c C-r) to the sage shell. It only loads a file, as in
sage: load('/tmp/sage_shell_moder97r9B/sage_shell_mode_temp.sage')
I expected it to show the results.
I am using emacs 26.3 and sage 8.1 on Ubuntu 18.4. I have no special configuration in init.el other than
(require 'sage-shell-mode)
(sage-shell:define-alias)
Thank you for help.bhaskaraya namahSun, 29 Mar 2020 15:39:58 -0500http://ask.sagemath.org/question/50429/solve() does not solvehttp://ask.sagemath.org/question/50421/solve-does-not-solve/The output of this system is [] after waiting 10 mins. What's the problem here?
var('a2,b2')
solve([
log(10,a2) + log(10,b2) * 435 == 50.88,
log(10,a2) * 435 + log(10,b2) * 8555 == 979.15], a2,b2)Alex89Sun, 29 Mar 2020 12:24:47 -0500http://ask.sagemath.org/question/50421/How can you get the n'th function in a sequence defined by a recurrence relation?http://ask.sagemath.org/question/50412/how-can-you-get-the-nth-function-in-a-sequence-defined-by-a-recurrence-relation/ Let a_0(x) and b_0(x) be given functions. Then define a_n and b_n by the following relations (or any)
a_n(x) = a_{n-1}(x+1) - a_{n-1}(x) + a_0(x+1)*a_{n-1}(x) + b_{n-1}(x)
b_n(x) = b_{n-1}(x+1) - b_{n-1}(x) + a_{n-1}(x)*b_0(x+1)
How can I write a program to print the n'th pair of functions in the sequence?
I'm new to sagemath and I've been trying to work through this problem on my own, but the bugs I've been running across make me think the way I'm writing my methods is wrong. Here's what I came up with using a different relation
var('x,a,b')
#the first functions in the recurrence relation. Making these more complicated will give you wrong outputs.
def lam_0(x):
return a*x
def s_0(x):
return b
#The lam_n based on the starting function lam_0.
#Example: lam_2 would be lam_forward(lam_0, s_0, z, 2)
def lam_forward(lam_func, s_func, z, n = 1):
if n <= 0:
return lam_0(z)
else:
return lam_forward(lam_func, s_func, z + 1, n - 1) - lam_forward(lam_func, s_func, z, n - 1) + lam_forward(lam_func, s_func, z + 1, n - 1)*lam_0(z) + s_forward(lam_func, s_func, z+1, n-1)
#The s_n based on the starting function s_0.
def s_forward(lam_func, s_func, z, n = 1):
if n <= 0:
return s_0(z)
else:
return s_forward(lam_func, s_func, z+1, n-1) - s_forward(lam_func, s_func, z+1, n-1) + lam_forward(lam_func, s_func, z + 1, n - 1)*s_0(z)
#Print the n'th pair of functions
def printNthFunctions(n=0):
print('Lam_', n, ' =', lam_forward(lam_0(x), s_0(x), x, n).full_simplify())
print('S_', n, ' = ', s_forward(lam_0(x), s_0(x), x, n).full_simplify())
#BUG After n=1, this does not output the correct function, even though the individual functions are correct
def d_n(z, n):
return s_forward(lam_0(z), s_0(z), z, n)*lam_forward(lam_0(z), s_0(z), z, n-1) - s_forward(lam_0(z), s_0(z), z, n-1)*lam_forward(lam_0(z), s_0(z), z, n)
deadpan2297Sun, 29 Mar 2020 02:24:04 -0500http://ask.sagemath.org/question/50412/C-STACK overflow during integrationhttp://ask.sagemath.org/question/50407/c-stack-overflow-during-integration/ I am trying to run the following chunk of code
i = a*(1 + exp(-(b*x)^2/4)*cos(c*x)*cos(d*x))
i0 = i.subs(x=0)
W = 2*i - i0
G = integrate(W*exp(-I*k*x),(x,-oo,oo),algorithm="fricas").full_simplify()
with a,b,c,d,k,x being variables. When I do, I get the error
TypeError: ECL says: C-STACK overflow at size 1048576. Stack can probably be resized. Proceed with caution
The interesting thing is that when I have
i = a*(1 + exp(-b*x^2/4)*cos(c*x)*cos(d*x))
and everything else the same, the integral can be performed. I was wondering either how to resize the stack as the error message suggests or how to fix the overflow?
Thank you for your time
dreycenfoilesSun, 29 Mar 2020 00:11:49 -0500http://ask.sagemath.org/question/50407/I need to plot two differential equations on the same set of axes (with a legend showing which is which). My domain has to be 0≤t≤100. Listed below is my code, any help is greatly appreciated.http://ask.sagemath.org/question/50394/i-need-to-plot-two-differential-equations-on-the-same-set-of-axes-with-a-legend-showing-which-is-which-my-domain-has-to-be-0t100-listed-below-is-my/Listed below is my code:
t = var('t')
x = function('x')(t)
y = function('y')(t)
de1 = diff(x,t) == -3/20*x + 1/12*y
de2 = diff(y,t) == 3/20*x-3/20*y
sol = desolve_system([de1,de2],[x,y],ics=[0,4,0])
f(t) = sol[0].rhs()
g(t) = sol[1].rhs()PolarizedIceFri, 27 Mar 2020 15:59:50 -0500http://ask.sagemath.org/question/50394/How can I generate functions in a sequence defined by a recurrence relation?http://ask.sagemath.org/question/50411/how-can-i-generate-functions-in-a-sequence-defined-by-a-recurrence-relation/ Let a_0(x) and b_0(x) be given functions. Then define a_n and b_n by the following relations
a_n(x) = a_{n-1}(x+1) - a_{n-1}(x) + a_0(x+1)*a_{n-1}(x) + b_{n-1}(x)
b_n(x) = b_{n-1}(x+1) - b_{n-1}(x) + a_{n-1}(x)*b_0(x+1)
How can I write a program to print the n'th pair of functions in the sequence?
I'm new to sagemath and I've been trying to work through this problem on my own, but the bugs I've been running across make me think the way I'm writing my methods is wrong. Here's what I came up with
var('x,a,b')
#the first functions in the recurrence relation. Making these more complicated will give you wrong outputs.
def lam_0(x):
return a*x
def s_0(x):
return b
#The lam_n based on the starting function lam_0.
#Example: lam_2 would be lam_forward(lam_0, s_0, z, 2)
def lam_forward(lam_func, s_func, z, n = 1):
if n <= 0:
return lam_0(z)
else:
return lam_forward(lam_func, s_func, z + 1, n - 1) - lam_forward(lam_func, s_func, z, n - 1) + lam_forward(lam_func, s_func, z + 1, n - 1)*lam_0(z) + s_forward(lam_func, s_func, z+1, n-1)
#The s_n based on the starting function s_0.
def s_forward(lam_func, s_func, z, n = 1):
if n <= 0:
return s_0(z)
else:
return s_forward(lam_func, s_func, z+1, n-1) - s_forward(lam_func, s_func, z+1, n-1) + lam_forward(lam_func, s_func, z + 1, n - 1)*s_0(z)
#Print the n'th pair of functions
def printNthFunctions(n=0):
print('Lam_', n, ' =', lam_forward(lam_0(x), s_0(x), x, n).full_simplify())
print('S_', n, ' = ', s_forward(lam_0(x), s_0(x), x, n).full_simplify())
deadpan2297Sun, 29 Mar 2020 02:05:24 -0500http://ask.sagemath.org/question/50411/passing function to a functionhttp://ask.sagemath.org/question/50408/passing-function-to-a-function/Would any body please help in making following work?
def test(f):
plot(f)
test(x+1)OrangeSun, 29 Mar 2020 00:38:23 -0500http://ask.sagemath.org/question/50408/What are the specific steps to find XGCD on the polynomial ring $Z_8[x]$http://ask.sagemath.org/question/50389/what-are-the-specific-steps-to-find-xgcd-on-the-polynomial-ring-z_8x/Division cannot be performed on rings with zero divisors.
There are zero divisors in Z8[x], how do we calculate the value of XGCD in a polynomial ring Z8[x] ?wormFri, 27 Mar 2020 05:05:24 -0500http://ask.sagemath.org/question/50389/Iterate over Set partitions of given lengthhttp://ask.sagemath.org/question/50404/iterate-over-set-partitions-of-given-length/(Definition: for a set $S$, and a partition $P=\\{P_1,P_2,\ldots,P_k\\}$ of $S$, we say that the *length* of $P$ is $k$.)
I want to iterate over all partitions of $S$ whose length is $k$.
**Motivation**: I am testing a property for graphs which satisfy a certain coloring-property (which is **not** standard coloring). So I need to check, in turn, whether a partition in $1,2,\ldots,p$ parts will satisfy the restriction for this particular type of coloring, before I can proceed to the test I want to make.
If it helps, for traditional (proper) graph coloring there is an iterator that does precisely the type of thing I am looking for; it is called `all_graph_colorings`.tassioSat, 28 Mar 2020 15:22:34 -0500http://ask.sagemath.org/question/50404/Enable sage jupyter notebook to pretty_print all outputhttp://ask.sagemath.org/question/50392/enable-sage-jupyter-notebook-to-pretty_print-all-output/If i start a session with sage -n jupyter, then I can call pretty_print(...), which will format the argument and print it nicely.
Is there a command line argument, or a notebook menu option or a configuration file I can use to set this on a permanent, or per session basis, for all notebook (mathematical) output?
Best regards,
Magnus LarssonMagnus LarssonFri, 27 Mar 2020 07:25:34 -0500http://ask.sagemath.org/question/50392/What is the point 𝑃1=(−1,3) on the y^2=7𝑥4+𝑥3+𝑥2+𝑥+3 curve and the point corresponding to P on the x^2=x^3−250/3x−124927 curve?http://ask.sagemath.org/question/50373/what-is-the-point-p1-13-on-the-y27x4x3x2x3-curve-and-the-point-corresponding-to-p-on-the-x2x3-2503x-124927-curve/What is the point 𝑃1=(−1,3) on the y^2=7𝑥^4+𝑥^3+𝑥^2+𝑥+3 curve and the point corresponding to P on the x^2=x^3−250/3x−124927 curve?
(𝐸1:𝑦2=7𝑥4+𝑥3+𝑥2+𝑥+3,𝑃1=(−1,3) can be transformed to 𝐸2:𝑣2=𝑢3−250𝑢3−124927)
Thanks
GamzeeeThu, 26 Mar 2020 10:08:06 -0500http://ask.sagemath.org/question/50373/From number field to interval fieldhttp://ask.sagemath.org/question/9217/from-number-field-to-interval-field/Hello,
I would like to understand why the following works
sage: K1.<s1> = NumberField(x^3 - 2, 's1', embedding=RR(1.26))
sage: RIF(s1)
1.259921049894873?
and the following does not
sage: K2.<s2> =NumberField(x^3 - 2, 's2', embedding=CC(-0.63,1.09))
sage: CIF(s2)
Traceback (most recent call last)
...
TypeError: unable to coerce to a ComplexIntervalFieldElement
Thank you,
VincentvdelecroixWed, 08 Aug 2012 00:39:23 -0500http://ask.sagemath.org/question/9217/Tab autocompletion not working anymorehttp://ask.sagemath.org/question/50341/tab-autocompletion-not-working-anymore/The tab autocompletion is not working anymore. Instead I get the following message:
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.0, Release Date: 2020-01-01 │
│ Using Python 3.8.2. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
/usr/lib/python3.8/site-packages/jedi/cache.py:111: DeprecationWarning: Deprecated since version 0.16.0. Use get_signatures()[...].params
result = method(self, *args, **kwargs)
What can I do to solve the problem?ThrashTue, 24 Mar 2020 15:40:47 -0500http://ask.sagemath.org/question/50341/Polynomials over Quaternions via Determinantshttp://ask.sagemath.org/question/50310/polynomials-over-quaternions-via-determinants/I currently trying to get polynomials over quaternions out of determinants of matrices. Example giving below:
> Q.<i,j,k> = QuaternionAlgebra(SR, -1, -1)
> A=matrix(4,4,[0,j,0,j,j,0,0,j,0,0,0,0,j,j,0,0])
> I=matrix.identity(4)
> P=(j\*A-x\*I)
> P.det()
But it doesn't work. Any idea?draksFri, 20 Mar 2020 02:22:43 -0500http://ask.sagemath.org/question/50310/Scaling imageshttp://ask.sagemath.org/question/50364/scaling-images/ Hi,
I am trying to figure out how to create say an 800 x 600 image that will be able to fit different size sheets of paper. Eventually I would like to expand this algorithm to include all the other screen resolutions. However, when Sage generates an image there is the boarder of white. So I have to go in and crop it out with image editing software. This then changes the pixel dimension. I would like to get a ratio of 1:1 between the m x n image and the image generated. I have figured out this ratio when dpi value is at 100, and it turns out that a dpi value of about 172 will get me really close to creating an image of 800 x 600. However, the actual image is roughly 795 x 596, and if I use 173 it turns out to be 801 x 600.
I am wondering if someone has already created an algorithm to print a 1:1 scale for screen resolution to printed image?nooniensoong97Wed, 25 Mar 2020 16:48:17 -0500http://ask.sagemath.org/question/50364/How to find an example of a 6 by 6 symmetric matrix (which is not identity matrix and does not satisfy $A^2=\text{ Identity matrix}$) which is similar to its inverse?http://ask.sagemath.org/question/50342/how-to-find-an-example-of-a-6-by-6-symmetric-matrix-which-is-not-identity-matrix-and-does-not-satisfy-a2text-identity-matrix-which-is-similar-to-its/How to find an example of a 6 by 6 symmetric matrix (which is not identity matrix and does not satisfy $A^2=\text{ Identity matrix}$)which is similar to its inverse? I am trying to find one such example in Sage. Please give some idea to proceed.KuldeepTue, 24 Mar 2020 15:43:18 -0500http://ask.sagemath.org/question/50342/