Maple 16 Questions and Posts

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


> 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?



[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]



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))


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))


odeadvisor(sol1, psi(t))



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)




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))


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))


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


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)))






{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}





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

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


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



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



For the last couple of days I've been trying really hard to solve the linear PDE 

dR/dt = -dRdH/dqdp + dRdH/(dpdq) . Where R is a function R(t,q(t),p(t)) and H is the hamiltonian H=  p^2/2 +q^2 +2*q .

(dH/dp= p and dH/dq= -2q-2), q and p depends on the time t, and I'm supposed to solve the PDE and then plot the gaussian distribution (2D). 

I tried doing this:

pde := diff(R(t, q1(t), p1(t)), t) = -(diff(R(t, q(t), p(t)), q(t)))*p(t)+(diff(R(t, q(t), p(t)), p(t)))*(-2*q(t)-2)

But pdsolve(pde) gives me:  "Error, (in pdsolve/info) the name of the indeterminate function must be given". 

When I change q(t) to q and p(t) to p I get:

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

And then I'm lost. How do I solve this PDE in maple? 

Thankful for any help 



how to find roots of equation J0(xR) = 0 ,R is constant, using maple? I know command for zeros of Bessel function i.e J0(x) = 0.  but what to do with different argument?

Thank you very much !

I have 


where d is the exterior derivative. I would like to recover the function Z(x) by integrating both sides of the equation. How would I compute this in Maple?

I'm trying to compute the tensor product of two column vectors as






And the output is a column vector with entries: "16 x 1 Matrix", "Data Type: Anything", "Storage: rectangular", "Order: Fortran_order"


The Maple documentation indicates that this function should output the result of the kronecker tensor product of the input matrices, and I've followed the same form as the examples in the documentation... Does anyone know why this isn't working as it should?

The page ?type,piecewise shows the example

type(piecewise[](x < 1, a, b), 'piecewise');

and lines 4-8 of showstat(`print/piecewise`) deal with the case of an indexed piecewise. Yet I can find no other reference to indexed piecewise. What is it used for? When I put an index on a piecewise, nothing special seems to happen, either computationally or display-wise:

piecewise[abs](x > 0, x, -x);
piecewise[Carl](x > 0, x, -x);

The code in `print/piecewise` suggests that it serves some purpose.

I am working on an iterative code where I need to save a matrix in an intermediate step. My code is long and it uses a separate data file. So, I am trying to state my problem taking a simple example.

At first, I define a column matrix A0. Using A0, I do some calculations and test some conditions. 
In the next step, I want  to do similar calculations and test some conditions but this time by changing the first element of A0. For the purpose of later use, I need to save the matrix A0 in its original form. I am trying to use the following method but both A0 and A1 (modified A0) turn out to be same.

> restart;
> n := 3;
> A0 := Matrix(n, 1, 1);
> #Do some calculation with A0
> A1 := A0;
> A1[1, 1] := A1[1, 1]+.1*A1[1, 1];
> A1;
> print(A0, A1);

This might be because I set A1:=A0 in the third line. But how do I save A0 in its original form?



Hi everyone. I'm going to solve a problem of an article with hpm. well I wrote some initial codes(I uploaded both codes and article). but now I face with a problem. I cant reach to the correct plot that is in the article. could you please help me???

(dont think I am lazy ;))) I found f and g (by make a system with A1 and B1 and solve it i found f[0] and g[0], with p^3 coefficient in A-->f[1] and then with B2 I foud g[1]) and their plot was correct. but the problem is theta and phi and their plots :(( )

2.pdf   this is article





















diff(diff(diff(diff(f(eta), eta), eta), eta), eta)-R*((diff(f(eta), eta))*(diff(diff(f(eta), eta), eta))-f(eta)*(diff(diff(f(eta), eta), eta)))-1.0*(diff(g(eta), eta)) = 0


diff(diff(g(eta), eta), eta)-R*((diff(f(eta), eta))*g(eta)-f(eta)*(diff(g(eta), eta)))+1.0*(diff(f(eta), eta)) = 0


diff(diff(theta(eta), eta), eta)+10*R*f(eta)*(diff(theta(eta), eta))+.1*(diff(phi(eta), eta))*(diff(theta(eta), eta))+.1*(diff(theta(eta), eta))^2 = 0


diff(diff(phi(eta), eta), eta)+.5*R*f(eta)*(diff(phi(eta), eta))+1.000000000*(diff(diff(theta(eta), eta), eta)) = 0




f(0) = 0, (D(f))(0) = 1, g(0) = 0, theta(0) = 1, phi(0) = 1


f(1) = .5, (D(f))(1) = 0, g(1) = 0, theta(1) = 0, phi(1) = 0







(1-p)*(diff(diff(diff(diff(f(eta), eta), eta), eta), eta)-1.0*(diff(g(eta), eta)))+p*(diff(diff(diff(diff(f(eta), eta), eta), eta), eta)-R*((diff(f(eta), eta))*(diff(diff(f(eta), eta), eta))-f(eta)*(diff(diff(f(eta), eta), eta)))-1.0*(diff(g(eta), eta))) = 0


(1-p)*(diff(diff(g(eta), eta), eta)+1.0*(diff(f(eta), eta)))+p*(diff(diff(g(eta), eta), eta)-R*((diff(f(eta), eta))*g(eta)-f(eta)*(diff(g(eta), eta)))+1.0*(diff(f(eta), eta))) = 0


(1-p)*(diff(diff(theta(eta), eta), eta))+p*(diff(diff(theta(eta), eta), eta)+10*R*f(eta)*(diff(theta(eta), eta))+.1*(diff(phi(eta), eta))*(diff(theta(eta), eta))+.1*(diff(theta(eta), eta))^2) = 0


(1-p)*(diff(diff(phi(eta), eta), eta)+1.000000000*(diff(diff(theta(eta), eta), eta)))+p*(diff(diff(phi(eta), eta), eta)+.5*R*f(eta)*(diff(phi(eta), eta))+1.000000000*(diff(diff(theta(eta), eta), eta))) = 0



f(eta) = f[0](eta)+f[1](eta)*p



g(eta) = g[0](eta)+g[1](eta)*p



theta(eta) = theta[0](eta)+theta[1](eta)*p



phi(eta) = phi[0](eta)+phi[1](eta)*p




(-1.*R*(diff(f[1](eta), eta))*(diff(diff(f[1](eta), eta), eta))+R*f[1](eta)*(diff(diff(f[1](eta), eta), eta)))*p^3+(-1.*R*(diff(f[0](eta), eta))*(diff(diff(f[1](eta), eta), eta))-1.*R*(diff(f[1](eta), eta))*(diff(diff(f[0](eta), eta), eta))+R*f[0](eta)*(diff(diff(f[1](eta), eta), eta))+R*f[1](eta)*(diff(diff(f[0](eta), eta), eta)))*p^2+(diff(diff(diff(diff(f[1](eta), eta), eta), eta), eta)-1.0*(diff(g[1](eta), eta))-1.*R*(diff(f[0](eta), eta))*(diff(diff(f[0](eta), eta), eta))+R*f[0](eta)*(diff(diff(f[0](eta), eta), eta)))*p+diff(diff(diff(diff(f[0](eta), eta), eta), eta), eta)-1.0*(diff(g[0](eta), eta)) = 0



diff(diff(diff(diff(f[0](eta), eta), eta), eta), eta)-1.0*(diff(g[0](eta), eta)) = 0


diff(diff(diff(diff(f[1](eta), eta), eta), eta), eta)-1.0*(diff(g[1](eta), eta))-R*(diff(f[0](eta), eta))*(diff(diff(f[0](eta), eta), eta))+R*f[0](eta)*(diff(diff(f[0](eta), eta), eta)) = 0



f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0


f[1](0) = 0, (D(f[1]))(0) = 0, g[1](0) = 0, f[1](1) = 0, (D(f[1]))(1) = 0, g[1](1) = 0




(-1.*R*(diff(f[1](eta), eta))*g[1](eta)+R*f[1](eta)*(diff(g[1](eta), eta)))*p^3+(-1.*R*(diff(f[0](eta), eta))*g[1](eta)-1.*R*(diff(f[1](eta), eta))*g[0](eta)+R*f[0](eta)*(diff(g[1](eta), eta))+R*f[1](eta)*(diff(g[0](eta), eta)))*p^2+(diff(diff(g[1](eta), eta), eta)+1.0*(diff(f[1](eta), eta))-1.*R*(diff(f[0](eta), eta))*g[0](eta)+R*f[0](eta)*(diff(g[0](eta), eta)))*p+diff(diff(g[0](eta), eta), eta)+1.0*(diff(f[0](eta), eta)) = 0



diff(diff(g[0](eta), eta), eta)+1.0*(diff(f[0](eta), eta)) = 0


diff(diff(g[1](eta), eta), eta)+1.0*(diff(f[1](eta), eta))-R*(diff(f[0](eta), eta))*g[0](eta)+R*f[0](eta)*(diff(g[0](eta), eta)) = 0



f[0](0) = 0, (D(f[0]))(0) = 1, g[0](0) = 0, f[0](1) = .5, (D(f[0]))(1) = 0, g[0](1) = 0


f[1](0) = 0, (D(f[1]))(0) = 0, g[1](0) = 0, f[1](1) = 0, (D(f[1]))(1) = 0, g[1](1) = 0




(10.*R*f[1](eta)*(diff(theta[1](eta), eta))+.1*(diff(phi[1](eta), eta))*(diff(theta[1](eta), eta))+.1*(diff(theta[1](eta), eta))^2)*p^3+(10.*R*f[0](eta)*(diff(theta[1](eta), eta))+10.*R*f[1](eta)*(diff(theta[0](eta), eta))+.1*(diff(phi[0](eta), eta))*(diff(theta[1](eta), eta))+.1*(diff(phi[1](eta), eta))*(diff(theta[0](eta), eta))+.2*(diff(theta[0](eta), eta))*(diff(theta[1](eta), eta)))*p^2+(diff(diff(theta[1](eta), eta), eta)+10.*R*f[0](eta)*(diff(theta[0](eta), eta))+.1*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+.1*(diff(theta[0](eta), eta))^2)*p+diff(diff(theta[0](eta), eta), eta) = 0


C2:=diff(theta[1](eta), eta, eta)+Pr*R*f[0](eta)*(diff(theta[0](eta), eta))+Nb*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+Nt*(diff(theta[0](eta), eta))^2=0;

diff(diff(theta[0](eta), eta), eta) = 0


diff(diff(theta[1](eta), eta), eta)+10*R*f[0](eta)*(diff(theta[0](eta), eta))+.1*(diff(phi[0](eta), eta))*(diff(theta[0](eta), eta))+.1*(diff(theta[0](eta), eta))^2 = 0



theta[0](0) = 1, theta[0](1) = 0


f[0](0) = 0, (D(f[0]))(0) = 1, f[1](1) = 0, (D(f[1]))(1) = 0, theta[1](0) = 0, theta[1](1) = 0, phi[0](0) = 0, phi[0](1) = 0




.5*R*f[1](eta)*p^3*(diff(phi[1](eta), eta))+(.5*R*f[0](eta)*(diff(phi[1](eta), eta))+.5*R*f[1](eta)*(diff(phi[0](eta), eta)))*p^2+(diff(diff(phi[1](eta), eta), eta)+1.000000000*(diff(diff(theta[1](eta), eta), eta))+.5*R*f[0](eta)*(diff(phi[0](eta), eta)))*p+diff(diff(phi[0](eta), eta), eta)+1.000000000*(diff(diff(theta[0](eta), eta), eta)) = 0



diff(diff(phi[0](eta), eta), eta)+1.000000000*(diff(diff(theta[0](eta), eta), eta)) = 0


diff(diff(phi[1](eta), eta), eta)+1.000000000*(diff(diff(theta[1](eta), eta), eta))+.5*R*f[0](eta)*(diff(phi[0](eta), eta)) = 0



phi[0](0) = 1, phi[0](1) = 0


f[0](0) = 0, (D(f[0]))(0) = 1, f[1](1) = 0, (D(f[1]))(1) = 0, theta[1](0) = 0, theta[1](1) = 0, phi[1](0) = 0, phi[1](1) = 0






thanks for your favorits

Please check this:


sum1 := lcm(N, 0)+lcm(N, 1)+lcm(N, 2)+lcm(N, 3);

sum2 := sum(lcm(N, k), k = 0 .. N);


Why is sum2 wrong?



César Lozada


Hi everyone.

I'm going to solve a problem with HPM in Maple. I wrote some initial codes but now I'm confused becouse of P^0 coefficients in A1 and B1. I mean I can't reach to f0 and g0.

I upload that file. these are codes that i typed. could you please help me how can I reach to them(f0 & g0)?

1 2 3 4 5 6 7 Last Page 3 of 38