Maple 16 Questions and Posts

These are Posts and Questions associated with the product, Maple 16

I just found that Maple 17 and Maple 16 do not have the option "output=string" in the latex command.

And I need a way to convert the Latex generated to the screen to a string and save it to a variable like I can do with Maple 2017

Here is an example. In current Maple 2017 this works

result_of_int:=int((-5+3*x)^2/(2*x-1)^(7/2),x):
my_latex:= latex(result_of_int,output=string);

But in Maple 16, it gives an error

If I remove the output, then the result is not string.

How to capture the above output which is on the screen and save it as string in a variable?

I do not want to send the output to a file as is. I need to first convert it to a string, and save
it to variable first.

 

 

I have a system of equations that can't be solved analytically, but can be solved using fsolve. I would like to plot the solution for one of the unknowns as a function of a parameter "DV" that is in a few of the equations. There are two issues at hand. First, even if I give DV a numerical value, the solutions are of the form { x = 0.23, y = 4.56 }, a form that plot( ) obviously can't handle directly. Generally I have dealt with this by using the op( ) command to pick out the solution I want; is there a better way?

But even after I have the solution I want, fsolve( ) won't work until I give it a value for DV. Thus a plot( ) command like

   plot(op(2, op(2, fsolve({e1, e2}, {x, y})), DV = -1 .. 1)

fails with an "Error, (in fsolve) DV is in the equation, and is not solved for" error.

There's got to be an esy way to do this!

I found from this forum that to plot a 2D array of points use can be made of the Maple procedure surfdata.
 

Does anyone have suggestions on how to plot contours in (preferrably) Maple 16 or Maple 17?

I tried the following

Output := Array(-10 .. 10, -10 .. 10, proc (i, j) options operator, arrow; i^2+j^2 end proc):
F := proc (x, y) -> x^2+y^2 end proc:
surfdata(Output, color = F, dimension = 2);

but "the option dimension = 2" is a Maple 18 addition.

Ideally, I would like also to be able to plot contours with options found in the procedure
contourplot

Hi, i encountered this, error, and the link to the help page was broken.

Error, (in RootOf) expression independent of _S000100
 

I don't recall ever changing any settings in my copy of Maple 16. But for some reason, I tried to make a plot and it spit out line-printed output rather than a regular plot.

How do I change this back? I have no use for line-printed output.

lineprinted_fail.mw
 

plot([E1(x), E2(x), E3(x)], x = 0 .. 5, title = "Nitrogen Nucleus Second-Order Energy Shifts")


                                                                              
                  Nitrogen Nucleus Second-Order Energy Shifts                 
  |                                                                           
  +                                                                     HHHHH
6e-08                                                               HHHHH     
  +                                                            HHHHHH         
4e-08                                                     HHHHHH              
  +                                                  HHHHHH                   
  +                                           HHHHHHH                         
2e-08                                  HHHHHHHH                               
  +                           HHHHHHHHHH                                      
  +             HHHHHHHHHHHHHHH                                               
  ***************************************************************************
0 +              1    HHHHHHHHHH2HH           3              4              5
  +                               HHHHHHHHH                                   
-2e-08                                    HHHHHHHH                            
  +                                              HHHHHHH                      
-4e-08                                                 HHHHHH                 
  +                                                         HHHHHH            
  +                                                              HHHHH        
-6e-08                                                                HHHHH   
  +                                                                       HHH
                                                                              

 

NULL

``


 

Download lineprinted_fail.mw

 

Hello,

I am solving a simple system of algebraic equations in a "for" loop. I would like to write all the values of solutions to a matrix, but I only get the symbols. Here is my code:

A:=1:E:=0.1:L0:=<5,5,5,5>:m0g:=0.05:u:=<-5/4,-1/4,-3/4,-1/4>:v:=<-1/2,-3/2,1/2,1/2>:w:=<0,1,0,-1>:
Force:=Matrix(m,2);
for i from 1 to m do
 r1||i:=H||i*L0(i)/(A*E)+H||i/m0g*(arcsinh(V_A||i/H||i)+arcsinh((m0g*L0(i)-V_A||i)/H||i))-sqrt(u(i)^2+v(i)^2);
 r2||i:=V_A||i*L0(i)/(A*E)*(m0g*L0(i)/(2*V_A||i)-1)+H||i/m0g*(sqrt(1+((m0g*L0(i)-V_A||i)/H||i)^2)-sqrt(1+(V_A||i/H||i)^2))-abs(w(i));
 rozw||i:=fsolve({r1||i, r2||i}, {H||i,V_A||i},H||i=0..1);Force(i,1):=H||i;Force(i,2):=V_A||i;subs(rozw||i,Force(i,..));
end do:
evalf(Force);

Thanks in advance,

Iza

Let be the number z so that |z+3-2*I| + |z-3-8*I| = 6*sqrt(2). Find min and max of the modulus of z. How can I find min and max of modulus of z with Maple.

Thank for your help!

How to manually switch frames in the DifferentialGeometry package? (Example: Help_Differential geometry_lesson2_exercise 4). Thank you

Maple 16 code

 

N1 := FileTools[Text][CountLines](g)

I encounter an error message

in FileTools:-Text:-CountLines) permission denied

What  went wrong ?  This never happened before

I  re install  Maple 16, the same error persists.

 

Please help

Martin
 


Please help me on this :

restart; with(PDETools), with(plots)

n := .3:

Eq1 := (1-n)*(diff(f(x, y), `$`(y, 3)))+(1+x*cot(x))*f(x, y)*(diff(f(x, y), `$`(y, 2)))-(diff(f(x, y), y))/Da+(diff(f(x, y), y))^2+n*We*(diff(f(x, y), `$`(y, 2)))*(diff(f(x, y), `$`(y, 3)))+sin(x)*(theta(x, y)+phi(x, y))/x = x*((diff(f(x, y), y))*(diff(f(x, y), y, x))+(diff(f(x, y), `$`(y, 2)))*(diff(f(x, y), x))):

Eq2 := (diff(theta(x, y), `$`(y, 2)))/Pr+Nt*(diff(theta(x, y), y))^2/Pr+Nb*(diff(phi(x, y), y))*(diff(theta(x, y), y))/Pr+(1+x*cot(x))*f(x, y)*(diff(theta(x, y), y)) = x*((diff(f(x, y), y))*(diff(theta(x, y), x))+(diff(theta(x, y), y))*(diff(f(x, y), x))):

Eq3 := Nb*(diff(phi(x, y), `$`(y, 2)))/(tau*Pr)+Nt*(diff(theta(x, y), `$`(y, 2)))/(tau*Pr)+(1+x*cot(x))*f(x, y)*(diff(phi(x, y), y)) = x*((diff(f(x, y), y))*(diff(phi(x, y), x))+(diff(phi(x, y), y))*(diff(f(x, y), x))):

ValWe := [0, 5, 10]:

bcs := {Nb*(D[2](phi))(x, 0)+Nt*(D[2](theta))(x, 0) = 0, f(0, y) = ((1/12)*y)^2*(6-8*((1/12)*y)+3*((1/12)*y)^2), f(x, 0) = 0, phi(0, y) = -.5*y, phi(x, 12) = 0, theta(0, y) = (1-(1/12)*y)^2, theta(x, 0) = 1, theta(x, 12) = 0, (D[2](f))(x, 0) = Da^(1/2)*(D[2, 2](f))(x, 0)+Da*(D[2, 2, 2](f))(x, 0), (D[2](f))(x, 12) = 0}:

pdsys := {Eq1, Eq2, Eq3}:

p1 := ans[1]:-plot(theta(x, y), x = 1, color = blue):

plots[display]({p1, p2, p3})

 

``


 

Download untitle_2_(1).mw

Download 2222222222222222222.mw

 

> restart; 
> A[0] := 10^(-3); a := 10^5;
> sys := diff(R(theta), theta) = A[0]*exp(2*mu(theta))*sin(theta)/(2*a), R(theta) = 2*exp(-2*mu(theta))*(1-(diff(mu(theta), `$`(theta, 2)))-cot(theta)*(diff(mu(theta), theta)));
> cond := R(0) = 10^(-5), mu(0) = 118.92, (D(mu))(0) = 0;
> F := dsolve({cond, sys}, [R(theta), mu(theta)], numeric);
> with(plots);
> odeplot(F, [theta, R(theta)], 0 .. 3.14, color = black, thickness = 3, linestyle = 4)
> odeplot(F, [theta, mu(theta)], 0 .. 3.14, color = blue, thickness = 3, linestyle = 1)

After last two lines maple writes:

Warning, cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up

And gives me empty plots. I can't figure out where an error can be. Some things I noticed:

Maple doesn't calculate the system before and after zero. If I change the range from 0..3.14 to -10..10 or to 0.00001..0.00001, it gives me 2 errors for 1 plot.

Also if I change the condition mu(0) = 118.92 to mu(0) = 1 or mu(0) = 50 or mu(0) = 80, it works. After ~80 it gives an error. I can't imagine where could appear a division by 0 or some other mistake.

I have been trying to find a solution for the equation below. Is there a non numerical explicit solution?
 

restart

with(DEtools)

[AreSimilar, Closure, DEnormal, DEplot, DEplot3d, DEplot_polygon, DFactor, DFactorLCLM, DFactorsols, Dchangevar, Desingularize, FunctionDecomposition, GCRD, Gosper, Heunsols, Homomorphisms, IVPsol, IsHyperexponential, LCLM, MeijerGsols, MultiplicativeDecomposition, ODEInvariants, PDEchangecoords, PolynomialNormalForm, RationalCanonicalForm, ReduceHyperexp, RiemannPsols, Xchange, Xcommutator, Xgauge, Zeilberger, abelsol, adjoint, autonomous, bernoullisol, buildsol, buildsym, canoni, caseplot, casesplit, checkrank, chinisol, clairautsol, constcoeffsols, convertAlg, convertsys, dalembertsol, dcoeffs, de2diffop, dfieldplot, diff_table, diffop2de, dperiodic_sols, dpolyform, dsubs, eigenring, endomorphism_charpoly, equinv, eta_k, eulersols, exactsol, expsols, exterior_power, firint, firtest, formal_sol, gen_exp, generate_ic, genhomosol, gensys, hamilton_eqs, hypergeomsols, hyperode, indicialeq, infgen, initialdata, integrate_sols, intfactor, invariants, kovacicsols, leftdivision, liesol, line_int, linearsol, matrixDE, matrix_riccati, maxdimsystems, moser_reduce, muchange, mult, mutest, newton_polygon, normalG2, ode_int_y, ode_y1, odeadvisor, odepde, parametricsol, particularsol, phaseportrait, poincare, polysols, power_equivalent, rational_equivalent, ratsols, redode, reduceOrder, reduce_order, regular_parts, regularsp, remove_RootOf, riccati_system, riccatisol, rifread, rifsimp, rightdivision, rtaylor, separablesol, singularities, solve_group, super_reduce, symgen, symmetric_power, symmetric_product, symtest, transinv, translate, untranslate, varparam, zoom]

(1)

``

sol := (JacobiCN((1/10)*sqrt(5)*sqrt(2)*t, (1/3)*sqrt(3))*sqrt(5)+2*sqrt(2))/(JacobiCN((1/10)*sqrt(5)*sqrt(2)*t, (1/3)*sqrt(3))*sqrt(5)+5*sqrt(2))

(JacobiCN((1/10)*5^(1/2)*2^(1/2)*t, (1/3)*3^(1/2))*5^(1/2)+2*2^(1/2))/(JacobiCN((1/10)*5^(1/2)*2^(1/2)*t, (1/3)*3^(1/2))*5^(1/2)+5*2^(1/2))

(2)

sol1 := diff(psi(t), t) = sol

diff(psi(t), t) = (JacobiCN((1/10)*5^(1/2)*2^(1/2)*t, (1/3)*3^(1/2))*5^(1/2)+2*2^(1/2))/(JacobiCN((1/10)*5^(1/2)*2^(1/2)*t, (1/3)*3^(1/2))*5^(1/2)+5*2^(1/2))

(3)

odeadvisor(sol1, psi(t))

[_quadrature]

(4)

sol2 := dsolve({sol1, psi(0) = 0})

psi(t) = Int((JacobiCN((1/10)*_z1*10^(1/2), (1/3)*3^(1/2))*5^(1/2)+2*2^(1/2))/(JacobiCN((1/10)*_z1*10^(1/2), (1/3)*3^(1/2))*5^(1/2)+5*2^(1/2)), _z1 = 0 .. t)

(5)

``

``

sol3 := convert(sol, parfrac)

1-(3/5)*2^(1/2)*5^(1/2)/(JacobiCN((1/10)*5^(1/2)*2^(1/2)*t, (1/3)*3^(1/2))+2^(1/2)*5^(1/2))

(6)

sol4 := diff(psi(t), t) = sol3

diff(psi(t), t) = 1-(3/5)*2^(1/2)*5^(1/2)/(JacobiCN((1/10)*5^(1/2)*2^(1/2)*t, (1/3)*3^(1/2))+2^(1/2)*5^(1/2))

(7)

dsolve({sol4, psi(0) = 0})

psi(t) = Int(-(3/5)*10^(1/2)/(JacobiCN((1/10)*_z1*10^(1/2), (1/3)*3^(1/2))+10^(1/2)), _z1 = 0 .. t)+t

(8)

sol5 := diff(psi(t), t) = 3*sqrt(2)*sqrt(5)/(5*(JacobiCN((1/10)*sqrt(5)*sqrt(2)*t, (1/3)*sqrt(3))+sqrt(5)*sqrt(2)))

diff(psi(t), t) = 3*2^(1/2)*5^(1/2)/(5*2^(1/2)*5^(1/2)+5*JacobiCN((1/10)*5^(1/2)*2^(1/2)*t, (1/3)*3^(1/2)))

(9)

odeadvisor(sol5)

[_quadrature]

(10)

dsolve({sol5})

{psi(t) = Int((3/5)*10^(1/2)/(JacobiCN((1/10)*t*10^(1/2), (1/3)*3^(1/2))+10^(1/2)), t)+_C1}

(11)

``


 

Download Jacobi_Diff_eqn_Mapleprime_post.mw

When I try the example from Maple Help for LPSolve (I use Windows)

with(Optimization);
LPSolve(-4*x-5*y, {0 <= x, 0 <= y, x+2*y <= 6, 5*x+4*y <= 20});

I do not get the same solution like in the example: [-19., [x = 2.66666666666667, y = 1.66666666666667]]
Instead I get

Warning, problem appears to be unbounded
            [0., [x = HFloat(0.0), y = HFloat(0.0)]]


My Professor uses the same version, but with Linux and do not have such problems. Why my installation does not solve the standart Help example?

Thank you

f1:=(1/s^2)^N;

Maple failed to convert it into  f1:=s^(-2N);

 

Hi! 

Tried to solve the PDE below (q and p are time-dependent variabels, q(t),p(t)):

pde := diff(rho(t, q, p), t) = -(diff(rho(t, q, p), q))*p+(diff(rho(t, q, p), p))*(2*q+2);
          

pdsolve(pde, rho(t, q, p));
           

And got the answer: 

rho(t, q, p) = _F1(p^2+2*q^2+4*q, -(1/2)*sqrt(2)*arctan((q+1)*sqrt(2)*(1/sqrt(p^2)))+t)

But I'm not sure how to interpret the result. I understand that  _F1 is an arbitrary function, but then I get confused with the comma? I thought that I'd get a function of q and p, where they depend on t. 

Best regards
Sannis

 

2 3 4 5 6 7 8 Last Page 4 of 40