MaplePrimes Questions

This is a general question concerning the numerical method(s) used in fsolve.

How can I know what algorithm / method (secant, Newton, etc.) is used when the  fsolve routine is called?

 

Thank you!

 

 

A few months ago i completely lost one of my linux operating systems in a single line of commands I entered into the terminal, and at some point I want to utilize the StringTools package with commands like  RegSubs and RegMatch to output the matching strings that match for the current command line content in a linux terminal, so I will know before I hit the enter key how stupid it was of me to do so *prior* to hitting the enter key.

 

The part I have no idea about is the piping of the keyboard input  for a terminal window to the maple session that will output the strings matching as previously described. I'm sorry if this question is not very clear I will try clarify more this afternoon. 

 

 

I have a tough integral I'm trying to solve (see attatched code). Maple seems to be able to compute it if I instruct it to integrate by parts, however the solutions don't make sense. For example, if I differentiate the result I expect to get my original integrand, but I do not. Furthermore, depending on which function you choose as 'u' and which as 'dv' when integrating by parts yields different results.

071319_Integral.mw

The attatched code has four examples:

1) Definite integration by parts

2) Indefinite integration by parts

3) Indefinite integration by parts, alternate choice of 'u'

4) Definite integration by parts, alternate choice of 'u'

and after each indefinite integration, I differentiate the result to compare with the orginal integrand.

What is going on here?

The exclaimation mark as far as i know can be viewed as an instruction to maple to begin communicating with the host operating system in some way. I attempted to open cmd.exe in windows 10 by entering 

 

>!cmd

 

But was not successful in passing arguments with the intention they are to be interpreted by the command prompt as commands that should be executed once cmd.exe is open.

 

Another maple command, ssystem seems to accomodate all the basic purposes for opening a terminal of the host OS, but the examples only involve commands that will be understood by a linux terminal, not the windows command line. I have a number of linux virtual machines running on my windows system, would it be possible open a terminal in one of those from the maple installation on the host machine?

 

 

The Help pages says:

Import a Worksheet from XML
  Open an existing XML document as a worksheet to modify the content or to change its appearance.
1. From the File menu, select Open. The Open dialog appears.
Select the Maple Worksheet as XML file type.

Those instructions do NOT apply to Maple 2018 on a Mac (although I have verified they DO apply on a Windows machine.) No dialog appears.

My .mw file is 90% format information and thenbits and pieces of Maple code. Is there some way to just extract the maple stuff? The file is pretty long and cutting out the xml stuff is very time consuming.

Thanks,

 

i have a probability function f(x,y,z)=x^3*y*z and constraint on its ranges x<y , y<z. how can i plot it fot f(x,y,z)=0.5

I am using Maple 2017 and the following equations gives me in correct result when I run `maple m.mpl` in terminal, however, when I run in using the GUI, the result is correct. (one result is postive while one is negative)

 

 

res := solve({
T000000=1/(1*4.57*10^(-06)+1*2.07*10^(-06)+1*2.83*10^(-06)) + T100000*1*4.57*10^(-06)/(1*4.57*10^(-06)+1*2.07*10^(-06)+1*2.83*10^(-06)) + T010000*1*2.07*10^(-06)/(1*4.57*10^(-06)+1*2.07*10^(-06)+1*2.83*10^(-06)) + T000010*1*2.83*10^(-06)/(1*4.57*10^(-06)+1*2.07*10^(-06)+1*2.83*10^(-06)) ,
T000010=1/(1*4.57*10^(-06)+1*2.07*10^(-06)+4) + T100010*1*4.57*10^(-06)/(1*4.57*10^(-06)+1*2.07*10^(-06)+4) + T010010*1*2.07*10^(-06)/(1*4.57*10^(-06)+1*2.07*10^(-06)+4) + T000000*4/(1*4.57*10^(-06)+1*2.07*10^(-06)+4) ,
T010000=1/(1*4.57*10^(-06)+1*2.83*10^(-06)+4) + T110000*1*4.57*10^(-06)/(1*4.57*10^(-06)+1*2.83*10^(-06)+4) + T010010*1*2.83*10^(-06)/(1*4.57*10^(-06)+1*2.83*10^(-06)+4) + T000000*4/(1*4.57*10^(-06)+1*2.83*10^(-06)+4) ,
T010010=1/(1*4.57*10^(-06)+4) + T000010*4/2/(1*4.57*10^(-06)+4) + T010000*4/2/(1*4.57*10^(-06)+4) ,
T100000=1/(1*2.07*10^(-06)+1*2.83*10^(-06)+4) + T110000*1*2.07*10^(-06)/(1*2.07*10^(-06)+1*2.83*10^(-06)+4) + T100010*1*2.83*10^(-06)/(1*2.07*10^(-06)+1*2.83*10^(-06)+4) + T000000*4/(1*2.07*10^(-06)+1*2.83*10^(-06)+4) ,
T100010=1/(1*2.07*10^(-06)+4) + T000010*4/2/(1*2.07*10^(-06)+4) + T100000*4/2/(1*2.07*10^(-06)+4) ,
T110000=1/(1*2.83*10^(-06)+4) + T010000*4/2/(1*2.83*10^(-06)+4) + T100000*4/2/(1*2.83*10^(-06)+4) }, { T000000,T000010,T010000,T010010,T100000,T100010,T110000 }):
T0 := subs(res, T000000):
printf("%g\n", T0);

 

Hi, in attached code pauldaas_05.mw, the procedure 'aFshear' and 'aFmoment' must be called within procedure ´aF0011´.

The procedures ´aF0011´, 'aFshear', 'aFmoment' build the matrixes R, C1 and C2 respectively.

Unfortunately ('aFshear' and 'aFmoment') gives 'Error, invalid left hand side in assignment'.

It is strange that ´aF0011´ can call them separately ('aFshear' or 'aFmoment') but not both ('aFshear' and 'aFmoment').

Maybe there should be an 'unassign' statement for 'L'  somewhere. I tried that but without result.

Is there anyone who can help me.

 

 

restart:
with(linalg):
L:=Vector[row]([''RA'',''MA'',''thetaA'',''yA'',''RB'',''MB'',''thetaB'',''yB'']):
R:=Matrix(0,8,0):
C1:=Matrix(0,10,0):
C2:=Matrix(0,10,0):


aF0011:=proc(nr,a,l,F,EI)
local B,RA,MA,thetaA,yA,RB,MB,thetaB,yB,aF;
global R;
R:=extend(R,1,0,0);
B[RA]:=0;
B[MA]:=0;
B[thetaA]:=F*(l-a)^2/(2*EI);
B[yA]:=-F*(a^3-3*a*l^2+2*l^3)/(6*EI);
B[RB]:=F;
B[MB]:=-F*(l-a);
B[thetaB]:=0;
B[yB]:=0;
B:=Matrix( [seq(B[i],i in [RA,MA,thetaA,yA,RB,MB,thetaB,yB])]);
copyinto(B,R,nr,1);
aFshear(nr,R);   #nested procedure
aFmoment(nr,R);  #nested procedure
end:

aFshear:=proc(nr,R)
local i,c;
global C1;
C1:=extend(C1,1,0,0);
R:=convert(R,Matrix);
zip(assign,L,R[nr,..]);
c[0]:=RA;
c[1]:=0;
c[2]:=0;
c[3]:=0;
c[4]:=-F;
c[5]:=0;
c[6]:=0;
c[7]:=0;
c[8]:=0;
c[9]:=0;
c:=Matrix([seq(c[i],i in [0,1,2,3,4,5,6,7,8,9])]);
copyinto(c,C1,nr,1);
end proc:

aFmoment:=proc(nr,R)
local i,c;
global C2;
C2:=extend(C2,1,0,0);
R:=convert(R,Matrix);
zip(assign,L,R[nr,..]);
c[0]:=MA;
c[1]:=RA;
c[2]:=0;
c[3]:=0;
c[4]:=0;
c[5]:=-F;
c[6]:=0;
c[7]:=0;
c[8]:=0;
c[9]:=0;
c:=Matrix([seq(c[i],i in [0,1,2,3,4,5,6,7,8,9])]);
copyinto(c,C2,nr,1);
end proc:

aF0011(1,a__1,l,F__1,EI):
aF0011(2,a__2,l,F__2,EI):
aF0011(3,a__3,l,F__3,EI):
R:=convert(R,Matrix);
C1:=convert(C1,Matrix);
C2:=convert(C2,Matrix);

l:=8000:
F__1:=15000:
F__2:=20000:
F__3:=35000:
a__1:=2000:
a__2:=2000:
a__3:=6000:
EI:=2E+5*2.49E+7:
R;
C1;
C2;

I have a system of ODEs with parameters, p[i], and variables, x[i].

f := [
-p[1]*x[1]^2+x[2],
-2*p[1]^2*x[1]^3+2*p[1]*x[1]*x[2]+x[1]+1
];

associated with the innitial conditions:
[x[1](0) = p[2], x[2](0) = p[3]].

I have sets of parameters that i am interested in

[p[1] = 1, p[2] = 2, p[3] = 3]
[p[1] = 2, p[2] = 2, p[3] = 7]
[p[1] = 3, p[2] = 2, p[3] = 11]
[p[1] = 4, p[2] = 2, p[3] = 15]
[p[1] = 5, p[2] = 2, p[3] = 19]
[p[1] = 6, p[2] = 2, p[3] = 23]
and so on.


The solutions for these equations appear to be anisotropic scalings of each other.

i.e.

/xh[1]\ =/1 0\ /x[1]\      
\xh[2]/   \0 q/ \x[2]/

where x is the variable for one parameter vector and xh is the variable for another; and q is a nuimber I am interesting in working out (and think may be p[1]).

how do you work out q?

[this is in fact a complicated way of asking when I numerically integrate an ODE on maple how do i get access to the sequence of numbers in the result]

Hi,

It might be a very basic question, but I am having trouble with the substitution of multiplication of symbols.  I have a equation in the format of     N*x*y-x*y+f(x,y)=0, and I need to substitute xy=1 in this equation without interferring in f(x,y).

When I am using subs commnad in maple, it is not recognizing xy nad giving me the same equation.

I really appreciate help in this matter.

Thanks in advance

Regards

Sunit

I have the following PDE

                         ...(1)

 

My Question: I have done manually following calculations. I want to verify the following operations are right, or not by MAPLE. Could you help me, please?

 

The METHOD:

Suppose that

                         ...(2)

In here,  is an Nx1 matrix, P, C are NxN matrices. (N is an integer and superscript T   denotes the transpose of the matrix.)  and P are given matrices. But the matrix C is ungiven I will find it in the final step. But my question doesn' t include all steps. I just wonder how to calculate the first two steps by Maple.

 

( If Maple doesn' t do matrix algebra, we can treat them as if , P, C were not matrix. I think the result won' t be changed. We will get again equation 9 by Maple.)

First Step

We will find the followings 

 

 in terms of the matrices  ,  P and C.

So, if we integrate Equation (2) with respect to x (from 0 to x), and  by using the following two assumptions

 

we have 

   ...(3)
 

substituting x=1  in Equation (3)

 ...(4)

if rewrite Eqn. (4), we have

...(5)

substituting Eqn. (5) to Eqn. (3), we have 

...(6)

integrating Equation (3) with respect to t,

we have 

...(7)

If we integrate Equation (2) from 0 to x with respect to t, we have

...(8)

Second Step We will substitute the terms to the pde ( Equation 1)

Substituting Eqn. (6), (7), (8) to Eqn. (1), we have finally

...(9)

I want to do the above calculations by Maple.  

Because I have more complex questions than above, I want to write a Maple code in order to avoid calculation errors.  

Final Step for curious: it's hard to explain the whole method here. Briefly, we will discretize equation 9 for some collocation points t and x. And after doing it, we will have a system of an algebraic equation. (N equation and N unknown ( C is Nx1 unknown vector to be find) )

And then we will substitute vector C to Eqn. 7

Code for Matrices , P^1, P^2,etc.

code.mw 

Best Regards...

Dear Users!

Hope you are doing well. Below is the code to solve system of equations

restart;M:=3;
u[0, 0] := tau[1]-2*tau[2]+3*tau[3] = 1;
u[0, 1] := tau[1]-tau[3] = 1/2;
u[0, 2] := tau[1]+2*tau[2]+3*tau[3] = 2;
SOL[0] := fsolve({seq(`$`(u[0, l1], l1 = 0 .. M-1))});

the solutions SOL[0] := {tau[1] = .7500000000, tau[2] = .2500000000, tau[3] = .2500000000}
I want to define a vector of order M*1 having the solution of of tau's like that

[.7500000000  .2500000000  .2500000000]

I'm waiting for you positive response. Thanks in advance.
Special request to:
@acer @Carl Love @Kitonum @Preben Alsholm

I need to set up in Maple the following binary operation $*$:

where $Q$ can be chosen to be a specific function (linear, polynomial, exponential or any other elementary function) of its input, while $\phi$ is kept the way it is (just "some function of $u$").

The main purpose of this Maple exercise is to check associativity of operation $*$ for various choices of $Q$.
Without $\phi$ (or $\phi$ being an identity map), I think I could check the associativity of $*$ with basic Maple syntax.  But keeping $\phi$ unknown makes it confusing.  Any advice on how to introduce this operation in Maple?
How to study this ellipse with LinearAlgebra without "geometry" eq := -185173378616457/6178315520000*x+86813215770519/24713262080000*(y^2)+126906272070543/24713262080000*(x^2)+256107247454961/6178315520000+(2514994832007/950510080000*x)*y-9123740375967/6178315520000*y = 0 Axis ? foci ? ...Thank you

Hello;
Anyone can guide to make the code of this expression

 

First 664 665 666 667 668 669 670 Last Page 666 of 2425