Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Dear all,

How can I decide that the product a*n appears on the list [1-a*n*xy, x+y]? I used from the following function but the result is false.

I am looking forward to hearing from you.

Sincerely yours

i have a problem with a nonlinear equation containing Heaviside step function. fsolve does not return anything and SolveEquation command also returns incorrect answer. How can i solve this equation? any method or help is appreciated.


 

 

restart:

with(DirectSearch):

F:=x*(Heaviside(x-(S0))/(1-DD)+Heaviside(-x+S0)/(1-HH*DD));

x*(Heaviside(x-S0)/(1-DD)+Heaviside(-x+S0)/(-DD*HH+1))

(1)

EQ:=F-E*Y;

-E*Y+x*(Heaviside(x-S0)/(1-DD)+Heaviside(-x+S0)/(-DD*HH+1))

(2)

HH:=0.2;
DD:=0.579350262599427;
S0:=1e8;
E:=70e9;
Y:=0.001668993263529;

.2

 

.579350262599427

 

0.1e9

 

0.70e11

 

0.1668993263529e-2

(3)

EQ

-116829528.5+x*(2.377274752*Heaviside(x-0.1e9)+1.131055455*Heaviside(-x+0.1e9))

(4)

fsolve(EQ)

fsolve(-116829528.5+x*(2.377274752*Heaviside(x-0.1e9)+1.131055455*Heaviside(-x+0.1e9)), x)

(5)

SolveEquations(EQ)

Warning, complex or non-numeric value encountered; trying to find a feasible point

 

[1.3868049384289111*10^13, Vector(1, {(1) = -3723983.000}), [x = 9.999999999999999*10^7], 231]

(6)

eval(EQ,x = 1.00000000000000*10^8)

Float(undefined)

(7)

 


 

Download fsolve.mw

Hello, I bring here a problem with maple that in result the  "".

I can remove '' in final results?

Thanks


 


  ;
  ):


  X= (R+r*costheta)*sinphi):
  = (R+r*costheta)*cosphi):
  Z= (r*sintheta)):

  
  r, theta, phi,
    X, Y, Z
  ):

 


   
  
    (1/2*Curl
      
        < u__rrtheta, phi),
            u__thetartheta, phi),
            u__phirtheta, phi)
          >,
          rtheta, phi
        )
      )
    )
  );

Vector(3, {(1) = (1/2)*csgn(r)*csgn(R+r*cos(theta))*(csgn(1, R+r*cos(theta))*(R+r*cos(theta))*`#msub(mi("u"),mi("&phi;",fontstyle = "normal"))`(r, theta, phi)+((R+r*cos(theta))*(diff(`#msub(mi("u"),mi("&phi;",fontstyle = "normal"))`(r, theta, phi), theta))-r*sin(theta)*`#msub(mi("u"),mi("&phi;",fontstyle = "normal"))`(r, theta, phi))*csgn(R+r*cos(theta))-csgn(r)*r*(diff(`#msub(mi("u"),mi("&theta;",fontstyle = "normal"))`(r, theta, phi), phi)))/(r*(R+r*cos(theta))), (2) = -(csgn(1, R+r*cos(theta))*(R+r*cos(theta))*`#msub(mi("u"),mi("&phi;",fontstyle = "normal"))`(r, theta, phi)+((R+r*cos(theta))*(diff(`#msub(mi("u"),mi("&phi;",fontstyle = "normal"))`(r, theta, phi), r))+cos(theta)*`#msub(mi("u"),mi("&phi;",fontstyle = "normal"))`(r, theta, phi))*csgn(R+r*cos(theta))-(diff(`#msub(mi("u"),mi("r"))`(r, theta, phi), phi)))*csgn(R+r*cos(theta))/(2*r*cos(theta)+2*R), (3) = (1/2)*(-(diff(`#msub(mi("u"),mi("r"))`(r, theta, phi), theta))+csgn(r)*r*(diff(`#msub(mi("u"),mi("&theta;",fontstyle = "normal"))`(r, theta, phi), r))+`#msub(mi("u"),mi("&theta;",fontstyle = "normal"))`(r, theta, phi)*(r*csgn(1, r)+csgn(r)))*csgn(r)/r})

(1)

``


 

Download

 

I am new to Maple. I have been plotting 3-dimensional graphs, and would like to plot points on the graph, but I don't see how to do that.

Thanks.

Hi all

for a given two parameter in the attached code ( G and PA) to compute the coefficient Cr

I would like to display the text to describe the corresponding situation ( maybe we one add a table )

 

Many tahnks for your help

 

 

 

testprint.mw

plot([v[Iterations-4], v[Iterations-3], v[Iterations-2], v[Iterations-1], v[Iterations-1]], t = 1 .. 2.9, color = [red, green, blue, black, purple]); g11 := plot([v[Iterations-4], v[Iterations-3], v[Iterations-2], v[Iterations-1], v[Iterations-1]], t = 1 .. 2.9, color = [red, green, blue, black, purple], numpoints = 200);

with(plots); p11 := display({g11}, axes = boxed, thickness = 2); dat1 := `~`[plottools:-getdata]([p11]); for i while i <= 5 do A[i] := dat1[i, 3]; Y[i] := A[i][1 .. -1, 2] end do; X := A[1][1 .. -1, 1]; MM1 := `<|>`(X, Y[j2]$j2 = 1 .. 5);

        [[                                                        
        [[                                                        
dat1 := [["curve", [1. .. 2.9, 1.25843241253069330813854745573 .. 
        [[                                                        

                                    [ 200 x 2 Matrix       ]]  
                                    [ Data Type: sfloat    ]]  
  3.64143345197220537035927195897], [ Storage: rectangular ]], 
                                    [ Order: Fortran_order ]]  

  [                                                              
  [                                                              
  ["curve", [1. .. 2.9, 1.26033290400709038909782882918 .. 6.355\
  [                                                              

                               [ 200 x 2 Matrix       ]]  [
                               [ Data Type: sfloat    ]]  [
  77353302842195250192992449], [ Storage: rectangular ]], [
                               [ Order: Fortran_order ]]  [

  "curve", [1. .. 2.9, 1.26039280181499972068892216922 .. 9.3496\

                              [ 200 x 2 Matrix       ]]  [
                              [ Data Type: sfloat    ]]  [
  4246576526181629314962273], [ Storage: rectangular ]], [
                              [ Order: Fortran_order ]]  [

  "curve", [1. .. 2.9, 1.26039397590711135163918382958 .. 10.112\

                              [ 200 x 2 Matrix       ]]  [
                              [ Data Type: sfloat    ]]  [
  7233044121210212769952674], [ Storage: rectangular ]], [
                              [ Order: Fortran_order ]]  [

  "curve", [1. .. 2.9, 1.26039397590711135163918382958 .. 10.112\

                              [ 200 x 2 Matrix       ]]]
                              [ Data Type: sfloat    ]]]
  7233044121210212769952674], [ Storage: rectangular ]]]
                              [ Order: Fortran_order ]]]
Error, 1st Matrix dimension size (1..1) is too small to fit source size (1..200)
Error, number of indices exceeds rank
ExportMatrix("C:/Users/DELL/Dropbox/Common Data (UH)/Hamid made model/For Hamid Thesis/P4 Picard for ODEs/Tecplot//P5 case 1.dat", MM1)
Error, invalid input: ExportMatrix expects its 2nd argument, M, to be of type {Matrix, list(Matrix)}, but received Vector[row](6, {(1) = X, (2) = Y[1], (3) = Y[2], (4) = Y[3], (5) = Y[4], (6) = Y[5]})
 

Hi, in the 'assign' command below, a certain row from matrix 'R' is assigned to the variables RA, MA .. yB. The command works well. However, I wonder if it could not be better/ shorter. So, without having to write out R [1], R [2] .. R [8].

I would be very happy if someone could advise me on this.

Here is the algorithm:

restart:with(linalg):
R:=Matrix(2,8,[1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18]);


aFshear:=proc(nr,R)
assign(('RA','MA','thetaA','yA','RB','MB','thetaB','yB')
= (R[1],R[2],R[3],R[4],R[5],R[6],R[7],R[8]));
end:


aFshear(2,row(R,2));
print(thetaB);

 

 

I am solving a wave propagation problem and after lots of derivations I ended up with the following differential equations. Any idea how to decouple this system so I can get two decoupled equations of the following forms:

equation (1): = function of (Q)      Equation (2): = function of (w)

System of Equations:

 

I want to evaluate a function of two variables at different values for these variables and collect the outputs in a matrix form. This is my best attempt at figuring it out -- using the string tools to evaluate a matrix at multiple values and spit out data. How can give each output labeled uniquely (not each line labeled A, but A,B,C... for n number of lines)? And How can I take the inner brackets out of the sequence output, to make each row of output data an array? Then I could refer to each data point individually with A[1],A[2],...,B[1],B[2],..., etc.

Please let me know if there is a better way to do this! Thank you, Jeremy

Also here is my code copied in text format for reference:

restart;
Zres:=5;
data:=[];
M:=Matrix(eval~(z*x,z=~[seq(n,n=1..Zres)]));
Array(eval~(z*x,z=~[seq(n,n=1..Zres)]));
with(LinearAlgebra):
for x from 1 to 5 by 0.5 do A:=[((op(data),seq(Column(M,n),n=1..Zres)))] od;

 

I am able to generate random polynomials with non-zero coefficents, and define sets of all the positive divisors of the leading coefficient and the constant terms. My question is this, how may I apply the rational zeros theorem to generate the set of all possible rational zeros of the polynomial. I basically need to form all the possible quotients (positive and negative) with numerator in one set and denominator in the other set, ignoring duplicates. The attached worksheet has what I've done so far.rational_zeros.mw
 

attempt := 1; while attempt > 0 do q := randpoly(x, coeffs = rand(-9 .. 9), degree = 3, dense); if nops(q) = 4 then attempt := -2 end if; attempt := attempt+1 end do; q

5*x^3+3*x^2-4*x-8

(1)

NumberTheory[Divisors](coeff(q, x, 3))

{1, 5}

(2)

NumberTheory[Divisors](coeff(q, x, 0))

{1, 2, 4, 8}

(3)

``


 

Download rational_zeros.mw

 

Hello:
I have a set like following:

               Set:={{1, 2}, {1, 3}, {1, 4}, {2, 3}};
I want to determine number of every member of set?
for example:  1 appears 3 times. 2 appears 2 times,
3 appears 2 times , 4 appears 1 time.

How to do?

 Dear ...

Let us consider $F$ be a parametric polynomial set. How can decide that $F$ contains a constant or parameters, automatically? For example, if $F=/{a*x^3-1, b*y+x, -1, c/}$ where $a, b$ and $c$ are parameters and $x$ and $y$ are variables then the output of procedure is true since of $F$ contains $c$ and also $-1$ and the outputs for $G=\{\a*x^3-1, b*y+x, x+y}$ is false. Is there any command or simple procedure for this conclusion?

I am looking forward to hearing from you

Sincerely yours.

The command eval allows to simplify a complicated expression

in a more compact form for a later output in LATEX

In the example which follows I was able to insert A and B but non C in the expression.

There is already a post on this kind of topic but I failed to understand the details.

Perhaps a Maple worksheet of answer on this topic  would be useful !

bye Lorenzo
 

restart;

expression:=exp(-b*x^c/2)*((x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c)) + c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c)))*c*WhittakerM((-c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c) + b^(-(3*c + a + 1)/(2*c))*x^(-(3*c)/2 + a/2 + 1/2)*WhittakerM((c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c)*(c + a + 1)^2)/((a + 1)*(c + a + 1)*(2*c + a + 1));

exp(-(1/2)*b*x^c)*((x^(-(3/2)*c+(1/2)*a+1/2)*(c+a+1)*b^(-(1/2)*(3*c+a+1)/c)+c*x^((1/2)*a+1/2-(1/2)*c)*b^(-(1/2)*(c+a+1)/c))*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(1)

``

(2)

expression_ABC:=eval(expression,[x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c))=A,c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c))=B,((a + 1)*(c + a + 1)*(2*c + a + 1))=C]);

exp(-(1/2)*b*x^c)*((A+B)*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(3)

 

 

 

 


 

Download maple_primes_eval.mw

 

maple does not work at all

it displays this error

Error, (in StringTools:-FormatMessage) unknown option MAPLE
 

Hare in the forest

First 540 541 542 543 544 545 546 Last Page 542 of 2097