Maple 2015 Questions and Posts

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

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

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

Hi friends! I have a problem with Random Variable. I don't understand why theoretical Mean differs from sample's Mean

restart; with(Statistics);

r := RandomVariable(NegativeBinomial(3, .1));
Mean((3-1)/(3+r-1));

0.1000000000

S := Sample(r, 10000);

d := map(unapply((3-1)/(3+t-1), t), S);

Mean(d);

0.04703520901756091

But !!

For example if p=0.2 then all is well

 

Hi all

I have this repetition with for:

for i from 1 to 10000 do x[i]:=sqrt(i); print(i); end do:

I want to know at the same time when the repetition is working, the value of i where the calculation is. Not at the last time of the calculation of all the repititions.

Example: when i=1, I want to see 1, when i=600, I want to see 600 at the same time of execution the repetition and not the last of the repetition  

Thank you

 

Hi

is it possible to remove this warning and not to show it when executing a procedure ? 

Warning, `AzIII` is implicitly declared local to procedure `lisse`

Thanks

I have a question about using embedded component in Maple 2015.

I want to import the MapleSim model to Maple and use the "Combo Box" (which is one of the embedded component in Maple) to load the parameters that were used in the MapleSim model.

 

Embedded Component

 

The picture above shows the Maple worksheet that I made simply.

As you can see, I imported the MapleSim file (which contains three parameters, m, c, and k) to the Maple by using "MapleSim Component (Embedded Component)".

After that, I wanted to load these three parameters to the "Combo Box" automatically like the picture above, but I couldn't do that.

(In the case above, I manually type m, c, and k in the "Combo Box")

 

Isn't there any way to load the parameters to "Combo Box" automatically?

I attached the MapleSim file that I made. It also contains the Maple worksheet.  

[TS]EmbeddedComponents.msim 

 

I appreciate any idea you may have.

hi.how i can dsolve couple linear equations with power series solutions or taylor series expantion?

file attached below.

thanks

 

TAYLOR.mw

Hello I have this assignment. I will translate it (because it is not english)

This is the assignment: [IMG]http://i68.tinypic.com/2cgoby9.jpg[/IMG]

(if u cant click on the above link, then u can see it here http://tinypic.com/view.php?pic=2cgoby9&s=9)

 

So it says:

-------

In an examination of young pigs' birth weight 853 newborn pigs were weighted. The weighting is shown in the table down below. 

 

[0,5-0,7] [0,7-0,9] [0,9-1,1] [1,1-1,3] [1,3-1,5] [1,5-1,7] [1,7-1,9] [1,9-2,1] [2,1-2,3] -> WEIGHT in kg

[26]            [43]       [102]       [145]        [171]      [196]     [119]       [42]          [9]      --> number of pigs

 

Draw a cumulative frequency curve of the weighting and determine the kvartils.

 

SO I usually do this in Maple, but this time I did a matrix but nothing happened.. I dont know how I should draw this curve? Help please. 

 

 

[IMG]http://i68.tinypic.com/2cgoby9.jpg[/IMG]

I have a vector, it is a zero vector apparently. I don't know what opperation lead to it being a zero vector. Any time I try to reduce this thing, I mess it up. I can't reduce it manually.

a=-((4*I)*sqrt(3)+4*sqrt(3)-5-7*I)/((4*I)*sqrt(3)+4*sqrt(3)-7-9*I)

b=-((390*I)*sqrt(3)+30*sqrt(3)-52-675*I)/(-3-4*I+2*sqrt(3)+(2*I)*sqrt(3))^3

c=-(1/2)*sqrt(2-2*I)*((6*I)*sqrt(3)+6*sqrt(3)-11-10*I)*(-2+sqrt(3))*sqrt(-2-2*I)*((2*I)*sqrt(3)+2*sqrt(3)-5-2*I)/(-3-4*I+2*sqrt(3)+(2*I)*sqrt(3))^3

 

<a/sqrt(a^2+b^2+c^2),b/sqrt(a^2+b^2+c^2),c/sqrt(a^2+b^2+c^2)>

 

The simplify command will reduce this bugger no problem. The moment I try rationalizing the denominator or anything like that I end up buggering the whole thing up. Maybe I should do a distance on two of the ordinates independently first. Anyway, I don't know what's up. 

I know how to use Maple for an optimization problem contaning continous variables but I couldn't find anything in help of Maple related to use boolean variables in optimization. So assume I want to minimize a function that one of its variables only can take 0 and 1 as its value. Anyone knows how to introduce those to the Maple? For example you can look at this link that Matlab can do many of these kind of optimizations.

First 52 53 54 55 56 57 58 Last Page 54 of 71