Maple 2015 Questions and Posts

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

hi.i encounter with another error for solving couple equations.

bcs := {f1(0) = 0, f1(L) = 0, f2(0) = 0, f2(L) = 0, f3(0) = 0, f3(L) = 0, ((D@@1)(f2))(0) = 0, ((D@@1)(f2))(L) = 0, ((D@@1)(f3))(0) = 0, ((D@@1)(f3))(L) = 0}; sys := subs(omega^2 = omega2, {PDE[111], PDE[222], PDE[333]}); sys2 := PDEtools:-dchange({x = L*y, f1(x) = g1(y), f2(x) = g2(y), f3(x) = g3(y)}, sys, [g1, g2, g3, y]); indets(sys2, specfunc(diff)); solve(sys2, {diff(g3(y), `$`(y, 4)), diff(g1(y), y, y, y), diff(g2(y), y, y, y, y)}); sys3 := subs(omega2 = 10^19*omega3, sys2); bcs3 := {g1(0) = 0, g1(1) = 0, g2(0) = 0, g2(1) = 0, g3(0) = 0, g3(1) = 0, ((D@@1)(g2))(0) = 0, ((D@@1)(g2))(1) = 0, ((D@@1)(g3))(0) = 0, ((D@@1)(g3))(1) = 0}; extra_bcs := `minus`({seq(seq(((D@@i)(g1))(a), i = 0 .. 1), a = 0 .. 1), seq(seq(((D@@i)(g2))(a), i = 0 .. 1), a = 0 .. 1), seq(seq(((D@@i)(g3))(a), i = 0 .. 3), a = 0 .. 1)}, `~`[lhs](bcs3)); dsys4 := {bcs3, sys3}; ds := dsys4[1]; indets(dsys4[1], specfunc(diff)); solve(dsys4[1], {diff(g3(y), `$`(y, 4)), diff(g1(y), y, y, y), diff(g2(y), y, y, y, y)}); newsys := {ds[2], ds[3], diff(ds[1], y)}; indets(newsys, specfunc(diff)); S := solve(newsys, {diff(g1(y), `$`(y, 3)), diff(g2(y), `$`(y, 4)), diff(g3(y), `$`(y, 4))}); nops(%); bcs2 := eval[recurse](convert(ds[1], D), `union`({y = 0}, bcs3)); nops(`union`(bcs3, {bcs2}));

Error, (in simpl/eval) numeric exception: division by zero

division_by_zero.mw

please help.thanks..

hi.how i can allocate infinite value for a parameter such as N ,which is attached below ( N := infinite) .i encounter with error.please see it and help

thanks..

 

restart; Digits := 55; a := 0; m := 1; n := 1; x[0] := 0; a := 0; h1 := proc (theta) options operator, arrow; cos(n*theta) end proc; h3 := proc (theta) options operator, arrow; cos(n*theta) end proc; h2 := proc (theta) options operator, arrow; sin(n*theta) end proc; N := infinite; `#mover(mi("z"),mo("ˆ"))` := z+z__c; z__c := (1/2)*h; `λ__c` := E__c*`υ__c`/(-`υ__c`^2+1); `μ__c` := E__c/(2*(1+`υ__c`)); `η__c` := E__c/(-`υ__c`^2+1); `λ__m` := E__m*`υ__m`/(-`υ__m`^2+1); `μ__m` := E__m/(2*(1+`υ__m`)); `η__m` := E__m/(-`υ__m`^2+1); E__m := 42.9*10^9; `υ__m` := .325; `ρ__m` := 6020; E__c := 170*10^9; `υ__c` := .25; `ρ__c` := 4640; h := 10^(-9); R := 10*h; L := 20*R; `ℓ` := 0; f := 0; `ε__r` := 0; `ε` := 8.8541878176*10^(-12)*`ε__r`; f__z := 0; `f__θ` := 0; f__x := 0; lambda := proc (`#mover(mi("z"),mo("ˆ"))`) options operator, arrow; (`λ__m`-`λ__c`)*(`#mover(mi("z"),mo("ˆ"))`/h)^N+`λ__c` end proc; mu := proc (`#mover(mi("z"),mo("ˆ"))`) options operator, arrow; (`μ__m`-`μ__c`)*(`#mover(mi("z"),mo("ˆ"))`/h)^N+`μ__c` end proc; rho := proc (`#mover(mi("z"),mo("ˆ"))`) options operator, arrow; (`ρ__m`-`ρ__c`)*(`#mover(mi("z"),mo("ˆ"))`/h)^N+`ρ__c` end proc; eta := proc (`#mover(mi("z"),mo("ˆ"))`) options operator, arrow; (`η__m`-`η__c`)*(`#mover(mi("z"),mo("ˆ"))`/h)^N+`η__c` end proc; `D__1,0` := int(eta(`#mover(mi("z"),mo("ˆ"))`), z = -z__c .. h-z__c); `D__1,1` := int(eta(`#mover(mi("z"),mo("ˆ"))`)*z, z = -z__c .. h-z__c); `D__1,2` := int(eta(`#mover(mi("z"),mo("ˆ"))`)*z^2, z = -z__c .. h-z__c); `D__3,0` := int(lambda(`#mover(mi("z"),mo("ˆ"))`), z = -z__c .. h-z__c); `D__3,1` := int(lambda(`#mover(mi("z"),mo("ˆ"))`)*z, z = -z__c .. h-z__c); `D__3,2` := int(lambda(`#mover(mi("z"),mo("ˆ"))`)*z^2, z = -z__c .. h-z__c); `D__5,0` := int(lambda(`#mover(mi("z"),mo("ˆ"))`), z = -z__c .. h-z__c); `D__5,1` := int(lambda(`#mover(mi("z"),mo("ˆ"))`)*z, z = -z__c .. h-z__c); `D__5,2` := int(lambda(`#mover(mi("z"),mo("ˆ"))`)*z^2, z = -z__c .. h-z__c); `I__1,0` := int(rho(`#mover(mi("z"),mo("ˆ"))`), z = -z__c .. h-z__c); `I__1,1` := int(rho(`#mover(mi("z"),mo("ˆ"))`)*z, z = -z__c .. h-z__c); `I__1,2` := int(rho(`#mover(mi("z"),mo("ˆ"))`)*z^2, z = -z__c .. h-z__c); with(Student[Calculus1])

[AntiderivativePlot, AntiderivativeTutor, ApproximateInt, ApproximateIntTutor, ArcLength, ArcLengthTutor, Asymptotes, Clear, CriticalPoints, CurveAnalysisTutor, DerivativePlot, DerivativeTutor, DiffTutor, ExtremePoints, FunctionAverage, FunctionAverageTutor, FunctionChart, FunctionPlot, GetMessage, GetNumProblems, GetProblem, Hint, InflectionPoints, IntTutor, Integrand, InversePlot, InverseTutor, LimitTutor, MeanValueTheorem, MeanValueTheoremTutor, NewtonQuotient, NewtonsMethod, NewtonsMethodTutor, PointInterpolation, RiemannSum, RollesTheorem, Roots, Rule, Show, ShowIncomplete, ShowSolution, ShowSteps, Summand, SurfaceOfRevolution, SurfaceOfRevolutionTutor, Tangent, TangentSecantTutor, TangentTutor, TaylorApproximation, TaylorApproximationTutor, Understand, Undo, VolumeOfRevolution, VolumeOfRevolutionTutor, WhatProblem]

(1)

NULL

 

 

infinite.mw

Assume we have a sreach with 10 for, for example

answer=0:

for i[1] from 1 by 1 to 5 do

    for i[2] from 1 by 1 to 5 do 

        ...

        if .... then answer=1: print(i[1],...,i[10]); "quitting the search"

        ...

     end do

end do

If I write break at qutting part, it will only exit from one for, one idea is putting if answer=1 break before end do of the rest for, that is why I used the local extra variable "answer" but is this the best idea? Any better idea which contains checking less if is apprecied.

Tengo una figura obtenida con ScatterPlot3D a partir de una Matriz de 3 dimensiones ( X,Y,Z ). ¿ Cómo puedo obtener la función polinómica z(x,y) que reprenta la superficie que se obtiene en el ScatterPlot3D ?

Hey

I have a simple question. 

In maple - when working with Ohm's Law.

Maple know how to calculate with e, but how can I show the result

I have calculated the following calculation:

(2e-4)/2

Maple returns the result:0.0001000000000

How do I maple show the result as 1e-4?

 

How do I multiply the 4x into the summation to get  (Sum(4*n*a[n]*x^(n), n = 0 .. infinity))  and same idea for the 3rd third?

Also, how do I go from   Sum(a[n-2]*x^(n-2), n = 2 .. infinity)  to  Sum(a[n]*x^(n), n = 0 .. infinity)  by manipulating the indices?

Is there any way to include EVERY possible, relevent function in the context sensitive menu?  I know this would be a lot so there will need to be submenus. 

 

Hello, I'm new to Maple and have a problem with making some electrical engineering.

I miss the unit VA (volt-ampere) which is used in AC. Maple won't recognize it and when I type it separately it changes to W (watt).

Hope someone can help me, thank!

By the way, how do you insert "Maple Code" in here?

Hi,

When I execute the command

series(exp(x),x)

and then refer to the equation in a new execution group using a equation label (CTRL-L on Windows), the equation is shown in Maple 18, but in Maple 2015 I get an error message: 'Error, missing operator or ';'. Using the % instead does work for both versions.

Is this intended behaviour or a bug in Maple 2015?

Thanks,

Bart

Can Maple simplify these DE's by eliminating the d/dt VL(t) by taking the derrivative of the bottom equation and substituting in the first one? 

In this question, I asked for a way to simplify an expression containing radicals. The discussion led us to that as default field for simplicfication is the Complex number system we should use assume or assuming command to simplify the radicals. However, the mothod suggested there seems to not work in this new case that I have. For details please see the attached file. The terms sqrt{u} and sqrt{u-1} should cancel in denominator.

 What Maple Does

restart

`ϕ` := (1+sqrt(5))*(1/2)

1/2+(1/2)*5^(1/2)

(1)

f := (1/2)*sqrt(-(u-1)*(u+1)*(u^2-u-1))*u*(4*u-3)/sqrt(u*(u-1))

(1/2)*(-(u-1)*(u+1)*(u^2-u-1))^(1/2)*u*(4*u-3)/(u*(u-1))^(1/2)

(2)

`assuming`([combine(f)], [1 < u and u < `&varphi;`])

(1/2)*u*(4*u-3)*((u+1)*(-u^2+u+1)/u)^(1/2)

(3)

`assuming`([simplify(f)], [1 < u and u < `&varphi;`])

(1/2)*(-u^2+u+1)^(1/2)*(u^2-1)^(1/2)*u^(1/2)*(4*u-3)/(u-1)^(1/2)

(4)

`assuming`([combine(f, radical)], [1 < u and u < `&varphi;`])

(1/2)*u*(4*u-3)*((u+1)*(-u^2+u+1)/u)^(1/2)

(5)

`assuming`([simplify(f, radical)], [1 < u and u < `&varphi;`])

(1/2)*((u-1)*(u+1)*(-u^2+u+1))^(1/2)*u*(4*u-3)/(u*(u-1))^(1/2)

(6)

``

Radical.mw

 Remark by Markiyan Hirnyk. The below content is added by the questionner on 08.02.2016 .

What Mathematica Does

 

IntegerPoints2  procedure generalizes  IntegerPoints1  procedure and finds all the integer points inside a bounded curved region of arbitrary dimension.  We also use a brute force method, but to find the ranges for each variable  Optimization[Minimize]  and   Optimization[Maximize]  is used instead of  simplex[minimize]  or  simplex[minimize] .

Required parameters of the procedure: SN is a set or a list of  inequalities and/or equations with any number of variables, the Var is the list of variables. Bound   is an optional parameter - list of ranges for each variable in the event, if  Optimization[Minimize/Maximize]  fails. By default  Bound  is NULL.

If all constraints are linear, then in this case it is recommended to use  IntegerPoints1  procedure, as it is better to monitor specific cases (no solutions or an infinite number of solutions for an unbounded region).

Code of the procedure:

IntegerPoints2 := proc (SN::{list, set}, Var::(list(symbol)), Bound::(list(range)) := NULL)

local SN1, sn, n, i, p, q, xl, xr, Xl, Xr, X, T, k, t, S;

uses Optimization, combinat;

n := nops(Var);

if Bound = NULL then

SN1 := SN;

for sn in SN1 do

if type(sn, `<`) then

SN1 := subs(sn = (`<=`(op(sn))), SN1) fi od;

for i to n do

p := Minimize(Var[i], SN1); q := Maximize(Var[i], SN1);

xl[i] := eval(Var[i], p[2]); xr[i] := eval(Var[i], q[2]) od else

assign(seq(xl[i] = lhs(Bound[i]), i = 1 .. n));

assign(seq(xr[i] = rhs(Bound[i]), i = 1 .. n)) fi;

Xl := map(floor, convert(xl, list)); Xr := map(ceil, convert(xr, list));

X := [seq([$ Xl[i] .. Xr[i]], i = 1 .. n)];

T := cartprod(X); S := table();

for k while not T[finished] do

t := T[nextvalue]();

if convert(eval(SN, zip(`=`, Var, t)), `and`) then

S[k] := t fi od;

convert(S, set);

end proc:

 

In the first example, we find all the integer points in the four-dimensional ball of radius 10:

Ball := IntegerPoints2({x1^2+x2^2+x3^2+x4^2 < 10^2}, [x1, x2, x3, x4]):  # All the integer points

nops(Ball);  # The total number of the integer points

seq(Ball[1000*n], n = 1 .. 10);  # Some points

                                                                    48945

                  [-8, 2, 0, -1], [-7, 0, 1, -3], [-6, -4, -6, 2], [-6, 1, 1, 1], [-5, -6, -2, 4], [-5, -1, 2, 0],

                                [-5, 4, -6, -2], [-4, -5, 1, 5], [-4, -1, 6, 1], [-4, 3, 5, 6]

 

 

In the second example, with the visualization we find all the integer points in the inside intersection of  a cone and a cylinder:

A := <1, 0, 0; 0, (1/2)*sqrt(3), -1/2; 0, 1/2, (1/2)*sqrt(3)>:  # Matrix of rotation around x-axis at Pi/6 radians

f := unapply(A^(-1) . <x, y, z-4>, x, y, z):  

S0 := {4*x^2+4*y^2 < z^2}:  # The inner of the cone

S1 := {x^2+z^2 < 4}:  # The inner of the cylinder

S2 := evalf(eval(S1, {x = f(x, y, z)[1], y = f(x, y, z)[2], z = f(x, y, z)[3]})):

S := IntegerPoints2(`union`(S0, S2), [x, y, z]);  # The integer points inside of the intersection of the cone and the rotated cylinder

Points := plots[pointplot3d](S, color = red, symbol = solidsphere, symbolsize = 8):

Sp := plot3d([r*cos(phi), r*sin(phi), 2*r], phi = 0 .. 2*Pi, r = 0 .. 5, style = surface, color = "LightBlue", transparency = 0.7):

F := plottools[transform]((x, y, z)->convert(A . <x, y, z>+<0, 0, 4>, list)):

S11 := plot3d([2*cos(t), y, 2*sin(t)], t = 0 .. 2*Pi, y = -4 .. 7, style = surface, color = "LightBlue", transparency = 0.7):

plots[display]([F(S11), Sp, Points], scaling = constrained, orientation = [25, 75], axes = normal);

      

 

 

In the third example, we are looking for the integer points in a non-convex area between two parabolas. Here we have to specify ourselves the ranges to enumeration (Optimization[Minimize] command fails for this example):

P := IntegerPoints2([y > (-x^2)*(1/2)+2, y < -x^2+8], [x, y], [-4 .. 4, -4 .. 8]);

A := plots[pointplot](P, color = red, symbol = solidcircle, symbolsize = 10):

B := plot([(-x^2)*(1/2)+2, -x^2+8], x = -4 .. 4, -5 .. 9, color = blue):

plots[display](A, B, scaling = constrained);

     

 

 IntegerPoints2.mw

 

I'm using Turkish windows on my pc. When I try to calculate some basic problem I encounter some problem on maple.

I searched on forum and I found one solution about this problem.

Solution is that "reach launch.ini file and put 'language=en' in it".

I tried this one but I couldnt manage to solve problem.

So in this point I have some question,

1.Is it matter where is I put this comment on the launch.ini file?

2.Is there any options doşng this?

 

Thanks in advance...

The scale of vertical axis is logarithmic and function in each interval must be linear. When I use the command " mode=log " the shape of lines are deformed into curves, however when I use the command " curve ", the shape of lines remains straight. I can use right-click for changing mode to logarithmic scale but is it possible to use label font for vertical axis as well as size, resolution and other options in the command "curve" ?

Thanks alot

 

 

restart; with(plottools):

SN := curve([[3, (4.566256-4.544647)/(4.544647)], [4, (4.544933-4.544647)/(4.544647)], [5, (4.544653-4.544647)/(4.544647)], [6, (4.544649-4.544647)/(4.544647)], [7, 0]]): PLOT(SN);

-----------------------------------------------------------------------------------------------------------------------

for m to 5 do

x[m] := m+2 end do:

y[1, 1] := (4.566256-4.544647)/(4.544647):y[2, 1] := (4.544933-4.544647)/(4.544647): y[3, 1] := (4.544653-4.544647)/(4.544647): y[4, 1] := (4.544649-4.544647)/(4.544647): y[5, 1] := 0:

for j to 1 do for i to 4 do

L[i, j] := (y[i+1, j]-y[i, j])*(x-x[i])+y[i, j] end do:

PW[j] := piecewise(`and`(x >= x[1], x < x[2]), L[1, 1], `and`(x >= x[2], x < x[3]), L[2, 1], `and`(x >= x[3], x < x[4]), L[3, 1], `and`(x >= x[4], x < x[5]), L[4, 1]) end do:

plot(PW[1], x = x[1] .. x[5], color = black, axes = framed, font = [Times, 13], size = [650, 550], resolution = 1200, legendstyle = [location = top], legend = ['gamma' = -.4], linestyle = solid, thickness = 2, labels = [Number*of*Basis, '(P-P[min])/P[min]'], labelfont = [Times, 13], axis[2] = [mode = log]);

------------------------------------------------------------------------------------------------------------------------

First 53 54 55 56 57 58 59 Last Page 55 of 73