williamdiao

40 Reputation

4 Badges

7 years, 242 days

MaplePrimes Activity


These are questions asked by williamdiao

Hi!

I am trying to export the plots I generated into black and white images. Currently, I am trying to use a proc as:

ExportFunctionPlot := proc(p::evaln, pname)
    local name, place, opts:
    name := cat(pname, ".eps"):
    opts := `landscape,width=768,height=768,noborder,axes=boxed,color="Black"`:
    plotsetup('eps', 'plotoutput'=name, 'plotoptions'=opts):
    print( plots:-display( eval(p), 'axesfont' = [ TIMES, 30 ],
                        'labelfont' = [ TIMES, ROMAN, 30] ) ):
    plotsetup(default):
end proc:

However, the eps files I got still have colored lines. Is there any way I can export to just black and white eps images?

Thanks!

William

Hi!

I am using solve() to solve a system of equations. Fortunately, the system is linear. Since it has more than 700 variables and more than 300 equations, I actually don't know if the solution exists.

I called solve() to solve the problem, and the solution I got indicates that all the variables are free variables. (That is, the solution is given as x_k = x_k for all variables.) Obviously, my system is not homogeneous, and 0 is not a solution to my problem. (I plugged in 0 and verified it.)

Since all the coefficients to my system are fractions, so I suppose the solve() function is using some symbolic algorithms? I don't know why this happens. Does this mean there is no solution to my system?

Thanks!

William

Hi!

I am trying to solve a large system using solve(). Fortunately, my system is linear and it does have solutions. Actually, the system has free variables that gives multiple solutions.

However, I have hundreds of variables with different names and subscripts, and I only need one solution of the system. I noticed that solve() actually output the solution with the free variables on the right. So, is there a way that I can find all the free variables and give them 0, to get only one set of solution?

Thanks!

William

Hi!

I have a question here. Is there any way to simplify a complicated number expressed in terms of RootOf() forms?

I got numbers like

c:=(3/128)*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^3-(5/32)*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^2+(1/64)*sqrt(4+6*sqrt(6))+(25/64)*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)-(3/128)*RootOf(3+3*_Z^2+(-3*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^3+20*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3)^2-47*RootOf(3*_Z^4-20*_Z^3+50*_Z^2-20*_Z+3))*_Z)-5/64

I am quite sure this number is 0: 
evalf(c, 100) gives:
0.+1.*10^(-101)*I

However, I tried simplify(c) and convert( c, 'radical' ) and some other choices of simplify() function. None of them can output 0. Is there any maple functions that can help me to simplify this kind of expressions?

Thanks!

William

Hi!

I a have a question about factorizing real polynomials.

Suppose I have a real polynomial p(x) with integer coefficients. If the degree of p(x) is less than or equal to 4, we can factorize it into linear radical factors. On the other hand, if we require the factorization to be real, theoretically we can factorize it into linear and irreducible quadratic factors.

My question is, if the input p(x) is real polynomial with integer coefficients, is there any Maple function that can give me factorization output with real linear and irreducible quadratic factors, with radical coeffs?

For example, I tried q := 20*x^3+10*x^2+4*x+1, it has one real root and 2 complex roots. I want a factorization like q(x) = 20*(x-r1)*(a*x^2 + b*x + c), with r1, a, b, c, all real radicals.

I compared functions: factors(), solve(), sqrfree(), Splits(), and none of them give what I want.

factors(q) gives: 
[20, [[x^3+(1/2)*x^2+(1/5)*x+1/20, 1]]]

 

factors(q, real)  gives: 
[20., [[x+.3423840948583691316993036540027816871936619136844427977504078911, 1], [x^2+.1576159051416308683006963459972183128063380863155572022495921089*x+.1460348209828001458360112632660894203743660942160039146818509889, 1]]]

solve(q)   gives:
-(1/30)*(350+105*sqrt(15))^(1/3)+7/(6*(350+105*sqrt(15))^(1/3))-1/6, (1/60)*(350+105*sqrt(15))^(1/3)-7/(12*(350+105*sqrt(15))^(1/3))-1/6+(1/2*I)*sqrt(3)*(-(1/30)*(350+105*sqrt(15))^(1/3)-7/(6*(350+105*sqrt(15))^(1/3))), (1/60)*(350+105*sqrt(15))^(1/3)-7/(12*(350+105*sqrt(15))^(1/3))-1/6-(1/2*I)*sqrt(3)*(-(1/30)*(350+105*sqrt(15))^(1/3)-7/(6*(350+105*sqrt(15))^(1/3)))

simplify(convert(Splits(q,x),radical))    gives:
[20, [[(1/30)*(350+105*sqrt(5)*sqrt(3))^(1/3)+1/6-7/(6*(350+105*sqrt(5)*sqrt(3))^(1/3))+x, 1], [-(1/60)*(I*sqrt(3)*(350+105*sqrt(5)*sqrt(3))^(2/3)+(35*I)*sqrt(3)+(350+105*sqrt(5)*sqrt(3))^(2/3)-60*x*(350+105*sqrt(5)*sqrt(3))^(1/3)-10*(350+105*sqrt(5)*sqrt(3))^(1/3)-35)/(350+105*sqrt(5)*sqrt(3))^(1/3), 1], [(1/60*I)*sqrt(3)*(350+105*sqrt(5)*sqrt(3))^(1/3)+(7/12*I)*sqrt(3)/(350+105*sqrt(5)*sqrt(3))^(1/3)-(1/60)*(350+105*sqrt(5)*sqrt(3))^(1/3)+1/6+7/(12*(350+105*sqrt(5)*sqrt(3))^(1/3))+x, 1]]]

None of them give me what I want. Is there any build-in function that can help me do that?

Thanks!

William

 

1 2 Page 1 of 2