MaplePrimes Questions

Simplest way to extract diagonal elements of a square symbolic matrix?

The diag command gives error

Error, (in linalg:-diag) parameters must be square matrices or scalars
 

Hi,

I would like to be able to manipulate the output of a OneSampleZTest for the Confidence Interval.  Here is what I have right now:

CI:=OneSampleZTest(S,mu,sdev,confidence=0.95,output='confidenceinterval');

The output for this is, for example: 1490.90920124091 .. 1497.18170785000

I interpret this to be a string.  What I would like is to split this into two separate outputs, say:

CI_lower:=some command to produce an output of 1490.90920124091

CI_upper:=some command to produce an output of 1497.18170785000

 

I have tried a number of commands in the StringTools package and I keep getting various errors.

Thanks.

Move integer to one side of an equation

g:=-18+2x-8y+5z=0 

of course g+18 will give desired look.  If the integer is unknown how to move integers to one side of the equation?

I have a big project in matlab that I've been writing for months. It includes a lot of code related to equations. The code worked with Matlab symbolic engine (or maybe it was Mupad I'm not sure). I wanted to switch to Maple symbolic engine so I downloaded Maple toolbox for Matlab. Now I can't run my code anymore since matlab doesn't recognize commands like 'vpasolve' (solve numeric equations), 'children' (finds subexpressions of a given expression), etc..

I'm looking for a long time for a tutorial that explains how to work with Maple toolbox for matlab that can expain in details what changes I need to make in my code to make it work. For example, I have no idea what to write instead of the 'children' command. I didn't find any tutorial. The best I've found so far is this link:

http://www-h.eng.cam.ac.uk/help/tpl/programs/Matlab/maplesymbolic.html

but It explains only a little and I still don't know what to do with many of the commands that I need to change (like 'children').

Can anyone suggest how I can change my code to make it work? or send me a link that explains that (if exists). I know a little Maple (mostly works with Matlab).

I know that ''op'' command in maple is the equivalent to "children" command in matlab. but I still don't know if I should use the command "op" in matlab (for maple engine) or something else.

Also, I have a command "eq=exp1==exp2" (where exp1 and exp2 are 3x3 matrices of symbolic expressions). In Mupad engine it defined eq as a matrix of equations but in maple engine eq is a logical matrix (all zeros). How can I write the equivalent (I mean code in matlab for maple engine)

Thanks!

_z i believe is the placeholder when Solve is intending to indicate a restriction to any integer value  only, for one of my recent projects im getting the placholder "_L" in my solutions, and would like to know where the reference table is for the full list of these global in built variable types if possible, have not been able to find it in the help interface and did sincerely look

Hi all!

I am using the solve command for solving 200 equations (linear in 200 unknowns) symbolically. The solve command computes efficiently for 50 equations, after which the efficiency decreases (RAM memory and computation issues).

Is there some other better way available to solve a system of algebraic equations symbolically?

thanks

Dear all,

 

I've just discover something quite surprising for me... It turns out like if Maple didn't take in account the linearity of the integral.

 

In the middle of a calculation, I need to compute the following integral

int(3628800 / (y * (1 / 2 + y)^11) - 3628800 / (y * (39 / 2 + y)^11), y = 39 / 2..infinity);

Maple 17 is not able to instantly answer me, and I'm not so patient... (I've waited more than 30s)

Nevertheless, if I ask Maple 17 to compute

3628800 * int(1 / (y * (1 / 2 + y)^11) - 1 / (y * (39 / 2 + y)^11), y = 39 / 2..infinity);

as well as

int(3628800/(y*(1/2+y)^11), y = 39/2..infinity)-int(3628800/(y*(39/2+y)^11), y = 39/2..infinity);

Maple 17 answer me instantly... which turn out to be quite surprising!

Is there someone, here, who has some ideas of what is happening in this calculation? Why Maple17 has this strange behaviour?

Many thanks for all your answers,

Tolliob

Dear friends!

Hope you would be fine. I want to solve the following system of ODEs

restart; L := 1; with(plots); Digits := 30;

a[1] := 0; a[2] := 1; a[3] := 2; a[4] := .2; a[5] := 4; a[6] := 6;

S := 1; Pr := 6.2; a := 1; a1 := 1; a2 := 1; lambda := 1; delta := 1; Bi := 1; A := 1; B := 1;

HA := [a[1], a[2], a[3]];

Eq1 := diff(F(eta), eta, eta, eta)+a*(a1*((F(eta)+G(eta))*(diff(F(eta), eta, eta))-(diff(F(eta), eta))^2)-M1*(diff(F(eta), eta))) = 0;

Eq2 := diff(G(eta), eta, eta, eta)+a*(a1*((F(eta)+G(eta))*(diff(G(eta), eta, eta))-(diff(G(eta), eta))^2)-M1*(diff(G(eta), eta))) = 0;

Eq3 := (A+B)*(diff(H(eta), eta, eta))+a2*Pr*(F(eta)+G(eta))*(diff(H(eta), eta)) = 0;

IC1 := F(0)+G(0)=0, (D(F))(0) = 1+delta*((D@@2)(F))(0), (D(G))(0) = lambda+delta*((D@@2)(G))(0), (D(H))(0) = -Bi*(1-H(0)), (D(F))(L) = 0, (D(G))(L) = 0, H(L) = 0;

params := {B111 = .2};
associated with the above (mentioned as red) boundary conditions. The problem which I faced in first condition i.e., F(0)+G(0)=0 because its combine condition for F(eta) and G(eta) which should be use for both function. The rest part of my program is below:

for k to nops(HA) do;

P || k := plots:-odeplot(dsolve(eval({Eq1, Eq2, Eq3, IC1}, `union`(params, {M1 = .5, phi = HA[k]})), numeric), [[eta, diff(F(eta), eta)]], linestyle = [solid, solid, solid, solid][k], color = [red, green, blue, red][k], labels = [eta, f], thickness = 3) end do;

f1 := plots:-display(P || (1 .. nops(HA)));

display(f1, axes = boxed, size = [380, 310], title = "Ethylene glycol/Cu: M = 2, S = -5", titlefont = ["Arial", 12, bold]);

Please fix my problem ASAP. I also attach the maple file. Thanks in advance.

Help.mw

I am tasked with making a table in Maple that gives the Taylor approximation of sin(x) from 0 degrees to 45 degrees accurate to four digits. The order selected is supposed to give an error from 0 to pi/4 less than 0.00005. I can't seem to create a table with a recurring task. Is there anyone that knows how to do this? Thank you!

 

 

Tristan 

Hello everybody

I have a variable U of type set, made of index names name[expression sequence] 
One example is 
U := {A[1], A[2], B[2]}

I want to build the set of all the expression sequence  ; in the example above this is {1, 2}
op~(U) does the job ... although I do not really understand why

I also want to buid the set of all the name ;  ( {A, B} in the example)
Here I have written something that performs correctly  ... but it is very uggly
parse~(substring~(convert~(U, string), 1..1));  # works only for names with a single character !!!


I do not know how to isolate the names ?
Is it possible to write something smarter ?

Thanks in advance

Hello

There are 13214 days between these two dates.

with(Finance): DayCount("Jan-01-1981", "MAR-7-2017");

But how can I find the end date, given the beginning date and the days between?

This doesn't work (of course, because the date is not a number):

fsolve(DayCount("Jan-01-1981", x)=13214)

is there a direct way? in excel i would do it indirectly using Goal Seek

Maple has had object-oriented features since about version 15, implemented with modules and records and the ability to define exports of these. Methods can be defined and called using module:-Method() and properties in a similar way including hierarchical constructs. Overloading of functions is possible, although I have run into trouble trying to overload build-in function. While this mechanism is not fully oo, I have found it enormously helpful for larger projects and a distinguishing feature of Maple.

More recently, the option object was added to modules. What are the true new functionalities? I see that the syntax for methods has changed (Method(object,arguments) rather than module:-method(arguments)) but I do not see how that is an improvement. I guess there are also now bona-fide constructors, doing what used to be done with a module factory (a proc that returns an instance of a module). And Object(object) seems to do what copy(module) does.

I am conceptualizing a larger package that will make use of the oo features of modules. I know I can write this using the established :- syntax using modules. Are there any benefits to using the newer objects rather than modules and records (& I know that all these are essentially modules)?

TIA,

M.D.

Why does

5103*`Ω`*(5*sqrt(7)+16)/((1+2*sqrt(7))^(3/2)*(7+2*sqrt(7))*(-2+sqrt(7))*(14+sqrt(7))*(2*sqrt(7)-1)*(4+sqrt(7)))

 

not simplify to

sqrt(1+2*sqrt(7))*`Ω`

 

???

Can I get help with equations, need to use the metrics.

1.  2*(3+4)-2*(4-3)

2.  (6+4):2+(4-5+2)*3-2

3.  -5*(-2+5)*(2-5)-3*(-2)

4.  7*(2-6*3+4)-5*8:2

5.  2*(6+4):4

6.  14+2*(5+23):2+4

7.  2*(9+3)+3*(6*(-2)-2:(6-2)*(-3)-10

 

Thanks

 

It would be nice to have asymptotics for hypergeom that are valid around abs(z)=infinity for any value of argument(z):

limit(hypergeom([1, 1], [2, 2], I*z), z = infinity); # zero
      limit(hypergeom([1, 1], [2, 2], I z), z = infinity)

series and asympt can give the expansions for +infinity or -infinity, not necessarily valid for other directions. FunctionAdvisor gives only the expansion at +infinity (which in this case is valid for Re(z)>0). Changes of variables like z->-z or z->1/z seem to never work in FunctionAdvisor(asymptotic_expansion, ...).

Also the expansions around z=1:

limit(hypergeom([1, 1, 1], [1/2, 2], z)*(z-1), z = 1); # zero
          /         /           [1   ]   \               \
     limit|hypergeom|[1, 1, 1], [-, 2], z| (z - 1), z = 1|
          \         \           [2   ]   /               /

And on the branch cuts:

limit(hypergeom([1/3, 1/3], [1/2], 2+I*a), a = 0); # the directional limits are different
                            /[1  1]  [1]   \
                   hypergeom|[-, -], [-], 2|
                            \[3  3]  [2]   /

 

First 942 943 944 945 946 947 948 Last Page 944 of 2433