MaplePrimes Questions

Hello

I wonder how I could use maple to manipulate a symbolic matrix.  For instance, I need to calculate the transpose of the following matrix:

 

Matrix(2, 2, [[Transpose(X)+X-Q, A . X], [Transpose(X) . Transpose(A), Q]])

 

where X, Q and A are matrices of unknown (but compatible) size.  Of course, the main problem is how  X, Q and A should be defined to allow maple to calculate the transpose. 

Many thanks.

 

Ed

 

 

I am new to Maple and need assistance optomizing the following function F with respect to t:

F := int(f, [yip = -infinity .. infinity, xip = -infinity .. infinity, tp = 0 .. t])

Where: f := exp(-(xip^2+yip^2)*(1/2))*exp(-((2*Pe*tp+x-xip)^2+(y-yip)^2+z^2)/(4*(t-tp)))/((4*Pi^(3/2))*(t-tp)^(3/2))

and

Pe := 10; x := 0; y := 8/10; z := 1/18

 

I have a plot of F from 0 to approximately 1/2 and I know what the shape of the function is:

 

Is is clear that there definitely is a maximum within this range of t (i.e. t=0 to 1/2). When I right click on the function F and click the "Optomization" tab, then "Maximize (local)" maple results in the following pink text "Error, (in Optimization:-NLPSolve) integration range or variable must be specified in the second argument, got HFloat(1.0) = 0 .. HFloat(1.0)"

 

Any help fixing the error and optimizing the function F will be appreciated. Thank you!

I am trying to numerically solve y'=f(x,y) with y(0)=y0, where f is a solution to a PDE. In this case, f is a numeric approximation itself. I attempted to add this equation to the system of equations when finding f, but pdsolve will not accept an equation of this form. Then, in attempting to use f in dsolve, I get an error, stating that the input system must be an ODE system, found {y(x),f(x,y(x))}. 

 

Is there any way to use dsolve or pdsolve to generate y(x)? Or will I have to stick with using more classical methods like RK4?

Hello dearz.

Hope you will be fine with everything. I am facing in plotting the set of points like seq(u[i,20] $ i=1..25) in the attached file. Please see the problem and fix it. I shall be vary thankful. Waiting quick and positive response.

Help.mw 

Dear maple users,

I am solving around 170 linear algebraic equations (symbolic) using linearalgebra " solve" command. I see the cpu usage is only 15%; as I the cpu is  i-7, octacore ,15% means around 1 core is in use. With time (12 hours)  cpu usage goes down to 0% showing free memory approx 0.

Why  is it happening? Is it due to high memory usage in storing large symobic expressions? Is there a way to engage all the cores( 100% Cpu)?

Thanks and regards.

Amor

Hi,

As a notional example those instructions generate 21 variables and around 4 Giga Bytes of data (bottom right of the Maple window ; roughly the same value read from the windows manager)

with(Statistics):
for n from 1 to 10 do
   X__||n := RandomVariable(Uniform(0,1)):
   S__||n := Sample(X__||n, 10^8)
end do:

I want to clean some part of the  memory ; for instance all the S__||n.
The following doesn't work

KeepVars := { seq(X__||n, n=1..10)}:
unassign({anames(user)} minus KeepVars ) ;
gc();


Is there a way to deallocate the memory occupied by some of my user variables ?
 

 

Hi there,

I was doing an exercise on maple as given above.I've tried to eliminate the warnings in green box by typing "local" in the relevant codes but without success. How should I proceed?

Thanks

I want to find an approximation for a 3-dim vector y(t)=(y1,y2,y3) at multiple times t, so as to get:

y(t1)=[b0,0,0](y1(t1))^0(y2(t1))^0(y3(t1))^0 + [b0,0,1](y1(t1))^0(y2(t1))^0(y3(t1))^1 + ... + [b3,0,0](y1(t1))^3(y2(t1))^0(y3(t1))^0

y(t2)=[b0,0,0](y1(t2))^0(y2(t2))^0(y3(t2))^0 + [b0,0,1](y1(t2))^0(y2(t2))^0(y3(t2))^1 + ... + [b3,0,0](y1(t2))^3(y2(t2))^0(y3(t2))^0

...

So I want 20 b coefficients with quaternary-base subscripts (I belive it is called) for multiple values of t.

I want to have enough approximations to solve for the the coefficients b and then perform a Least Squares method Calculation thereafter. 

Can anyone help me please?

Hello

I have an 8x8 sytem of equations where I can easily solve the first 2 equations by hand. If I solve the full system in Maple it gives me some ugly expressions and I would like to simplify it. I know that, at least some of it, can be simplified since I have solved two equations by hand. It is easy to show that N_M=(W_M/(B*K_A^(1-B)))^(1/(B-1)) and X_N=(W_M/(B*K_A^(1-B)))^(B/(B-1))*K_M^(1-B), but Maple gives me some result with logarithms.

Can anyone help me solve this system of equations and get some nice solutions, if at all possible?

Thank you!

Yoy can find my Maple file at: https://drive.google.com/open?id=0B5luBKCBLzmeM2MxNmFoQkdoRVk

test := proc(x) print("x=", x); op(0, x) = f end proc:
applyrule(conditional(x::anything, _test(x)) = 0, f(1));
                           "x=", f(1)
                            "x=", 0
                               0

test := proc(x) print("x=", x); op(0, x) = g end proc:
applyrule(conditional(x::anything, _test(x)) = 0, f(1));
                               0

First, I think this is wrong. Second, how to make applyrule forget the (apparently) cached result? Third, if it doesn't like me using the underscore with my own function, is there a way to rewrite conditional without it?

EDIT: As Carl pointed out here, gc() can be used as a kind of a universal forget() function. The second applyrule correctly returns f(1) after gc().

1. The results are incorrect, because the integral diverges and the p.v. integral exists but is real-valued:

int(1/((1-16*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 1/2);
                       (1/2)*EllipticPi(4, 1/2)

int(1/((1-16*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 1/2, CauchyPrincipalValue);
                       (1/2)*EllipticPi(4, 1/2)

This integral converges, but the closed form is wrong:

int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 3/2);
                       (1/2)*EllipticK(1/2)-(1/2)*EllipticF(2/3, 1/2)-(1/2)*EllipticPi(4, 1/2)+
                       (1/2)*EllipticPi(2/3, 4, 1/2)-(1/2*I)*EllipticK((1/2)*sqrt(3))-
                       (1/30*I)*EllipticPi(4/5, (1/2)*sqrt(3))+(1/2)*EllipticPi(1/16, 1/2)

2. The series expansion is wrong, because EllipticPi(1/4,16,2) is undefined:

series(EllipticPi(1/4+a, 16, 2), a = 0, 2);
                      EllipticPi(1/4, 16, 2)-(1/45)*sqrt(3)*sqrt(15)*ln(a)+O(a)

3. None of the methods listed on the evalf/Int page can handle this integral:

evalf(Int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 3/2));

Although it can be done by splitting the integration range into 0..1/2, 1/2..1, 1..3/2.

None of the methods listed on the evalf/Int page can handle this computation:

evalf(Int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 1 .. 2-10^(-7), digits = 20));

4. Since there are values of the parameters for which the integral diverges, this probably needs a condition saying that 1/sqrt(n) and -1/sqrt(n) are not on the segment [0,z]:

FunctionAdvisor(integral_form, EllipticPi(z, n, k));
                      [EllipticPi(z, n, k) = Int(1/((-n*`_α1`^2+1)*sqrt(-`_α1`^2+1)*
                         sqrt(-k^2*`_α1`^2+1)), `_α1` = 0 .. z),
                       `with no restrictions on `(z, n, k)]

Besides, for z=-1-I, n=1/4, k=2, the lhs and the rhs do not agree:

evalf(subs({z = -1-I, n=1/4, k=2}, %[1]));
                      -.1413755772+1.748734618*I = -.1413755772-.7752517350*I

Either the integral representation is not supposed to be valid everywhere, or Maple computes EllipticPi incorrectly.

z=(-1/(4*(-u+L)))(4*p^2*b^2*d-3*g*c*p^2)

given fixed values of u, L, and c, I would like to Maximiz Z(p, b) by finding best p and b, subject to 1-(2* d)/(p*(sqrt(g)+1))<=b<=1 and 0<=d<=L and Min(c,L)<=p<=u and1<=g<=4 

When I put "print(A=B=C);" in Maple 13 I get the error:

Error, `=` unexpected

about the second equality sign. How do I remedy that?
Thanks!

mapleatha

 

I input print(lambda*I) and I get I*lambda (Greek lambda symbol); Why is the order reversed?
Maple 13 (GUI) is doing it.
Thanks!

mapleatha

 I have in my Maple documents many good quality plots resulting from simulations. I need to export (or paste) them to templates of transactions in Word without loosing quality, and beeing flexible to some degree to fit the dimension.

Until now when I paste such plots the quality is lost and especially on descripltion on axes (vertical).

What I have to do? Do I need to go throuhg pdf format ? 

First 913 914 915 916 917 918 919 Last Page 915 of 2428