Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hello everyone,

I am experiencing a strange result. The Theta_double_dot got equated to zero in line 1.7. Please see the red arrow.

(I am using the Physics package)

How can I solve this issue?

with(Statistics):

CDF(Binomial(2, 1/2), x); # wrong
               piecewise(x < 0, 0, 2 <= x, 1, 1)

CDF(Binomial(2, p), x); # also wrong
     piecewise(x < 0, 0, 2 <= x, 1, p = 0, 1, p = 1, 0, 1)

Maple can actually generate PDFs for discrete distributions:

bpdf := unapply(PDF(Binomial(2, 1/2), x), x);
          x -> (1/4)*Dirac(x)+(1/2)*Dirac(x-1)+(1/4)*Dirac(x-2)

int(bpdf(t), t = -infinity .. x); # correct CDF
         (1/4)*Heaviside(x)+(1/2)*Heaviside(x-1)+(1/4)*Heaviside(x-2)

But then functions of random variables do not seem to work :

bdist := Distribution(PDF = bpdf, Support = -infinity .. infinity);

CDF(bdist, x); # OK
           piecewise(x < 0, 0, x = 0, undefined, x < 1, 1/4, x = 1, undefined, x < 2, 3/4, x = 2,
           undefined, 2 < x, 1)

CDF(add(RandomVariable(bdist), i = 1 .. 2), x); # indeterminate
          int((1/16)*Dirac(_t)^2+(1/4)*Dirac(0)*Dirac(_t-1)+(3/8)*Dirac(0)*Dirac(_t-2)+(1/4)*Dirac(0)*
          Dirac(_t-3)+(1/16)*Dirac(0)*Dirac(_t-4), _t = -infinity .. x)

It's a bit disappointing that Maple generates PDFs in terms of the delta function but doesn't support them properly, because that could be an easy and natural way to define mixed distributions.

Apologies for possible double post, it seemingly locked up upon trying to post the first time. 

So before I get as far as to ask for how to get a certain PDE system solved and plotted, I tried to fiddle a little bit around with linear algebra. 

  • First, the file SystemGoesWrong.mw . I have issues with declaring (same result if I remove the with(VectorCalculus)); as far as I can see, EQ0 and EQ00 should be the same, except that I have summed the vector in one of them. And the first that "works", is wrong: it returns a scaling of a vector. How come?
  • But then I copy everything from the heading and down into a worksheet where I was already fighting some linear algebra things (can someone please explain?): SystemDeclaresBut.mw 
    Then EQ0 and EQ00 declare just fine! What is the issue?
  • How do I get Maple to list the equations in "compact" form with vector-valued functions so that I can read and debug?  The actual PDE system I want to solve (numerically, of course), looks as follows: DE4Maple.pdf 
    That was also the reason why I tried to declare procedures (coordinate-wise maximum ...), but I guess that questions on how to extract a solution and plot it in a particular way will be its own posting after I have learned how to declare it.

 

The contents of the first file:


 

restart

# Since I do not have any idea of how to get vectors nicely, ...

... I replace U0, U1, U2 by u,v,w and use difftables U,V,W.  And y1, y2 replaced by y,z.

with(PDEtools):

declare(u(y, z), v(y, z), w(y, z), q1(y, z), r1(y, z), s1(y, z), q2(y, z), r2(y, z), s2(y, z), F1(y, z), F2(y, z)):

u(y, z)*`will now be displayed as`*u

 

v(y, z)*`will now be displayed as`*v

 

w(y, z)*`will now be displayed as`*w

 

q1(y, z)*`will now be displayed as`*q1

 

r1(y, z)*`will now be displayed as`*r1

 

s1(y, z)*`will now be displayed as`*s1

 

q2(y, z)*`will now be displayed as`*q2

 

r2(y, z)*`will now be displayed as`*r2

 

s2(y, z)*`will now be displayed as`*s2

 

F1(y, z)*`will now be displayed as`*F1

 

F2(y, z)*`will now be displayed as`*F2

(1)

``

M := `<|>`(`<,>`(2, -1), `<,>`(-1, 2))

M := Matrix(2, 2, {(1, 1) = 2, (1, 2) = -1, (2, 1) = -1, (2, 2) = 2})

(2)

1/M

Matrix([[2/3, 1/3], [1/3, 2/3]])

(3)

 

# The system

 

EQ0 := VectorCalculus:-`+`(VectorCalculus:-`+`(Typesetting:-delayDotProduct(`<|>`(F1, F2), VectorCalculus:-`+`(Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2)), VectorCalculus:-`-`(`<,>`(U[y], V[z])))), VectorCalculus:-`-`(Typesetting:-delayDotProduct(VectorCalculus:-`*`(1/4, VectorCalculus:-`+`(Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2)), VectorCalculus:-`-`(`<,>`(U[y], V[z])))^%T), VectorCalculus:-`+`(Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2)), VectorCalculus:-`-`(`<,>`(U[y], V[z])))))), VectorCalculus:-`-`(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(VectorCalculus:-`*`(1/2, `<|>`(VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(2, F1), U[y]), VectorCalculus:-`-`(s1)), VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(2, F2), V[z]), VectorCalculus:-`-`(s2)))), 1/M), `<,>`(q1, q2))))

EQ0 := -((1/6)*q1+(1/12)*q2-(1/4)*(diff(u(y, z), y)))*((2/3)*q1+(1/3)*q2-(diff(u(y, z), y)))-((1/12)*q1+(1/6)*q2-(1/4)*(diff(v(y, z), z)))*((1/3)*q1+(2/3)*q2-(diff(v(y, z), z)))+(Vector(1, {(1) = F1*((2/3)*q1+(1/3)*q2-(diff(u(y, z), y)))+F2*((1/3)*q1+(2/3)*q2-(diff(v(y, z), z)))}, attributes = [coords = cartesian]))+(Vector(1, {(1) = -((2/3)*F1+(1/3)*(diff(u(y, z), y))-(1/3)*s1+(1/3)*F2+(1/6)*(diff(v(y, z), z))-(1/6)*s2)*q1-((1/3)*F1+(1/6)*(diff(u(y, z), y))-(1/6)*s1+(2/3)*F2+(1/3)*(diff(v(y, z), z))-(1/3)*s2)*q2}, attributes = [coords = cartesian]))

(4)

EQ00 := `<|>`(F1, F2).(1/M.`<,>`(q1, q2)-`<,>`(U[y], V[z]))-(1/4)*LinearAlgebra:-Transpose(1/M.`<,>`(q1, q2)-`<,>`(U[y], V[z])).(1/M.`<,>`(q1, q2)-`<,>`(U[y], V[z]))-1/2*(2*`<|>`(F1, F2)+`<|>`(U[y], V[z])-`<|>`(s1, s2)).(1/M).`<,>`(q1, q2)

Error, (in rtable/Sum) invalid input: dimensions do not match: Matrix(1 .. 1, 1 .. 2) cannot be added to Vector[row](1 .. 2)

 

``

``


 

Download SystemGoesWrong.mw

 

 

 

... and of the second:

 

 


 

``

Over to some linear algebra.  

 

 

restart; with(LinearAlgebra); with(VectorCalculus)

NULL

LinearAlgebra:-Transpose(`<|>`(3, 4)).`<,>`(2, 3)

18

(1)

VectorCalculus:-DotProduct(VectorCalculus:-`<,>`(3, 4), VectorCalculus:-`<,>`(2, 3))

18

(2)

DotProduct(`<,>`(2, 3), `<|>`(3, 4))

Matrix([[6, 8], [9, 12]])

(3)

Trace(Matrix(%id = 18446746888362217830));

18

(4)

                                                                 

define(normsqbyDot, normsqbyDot(y::Vector) = VectorCalculus:-DotProduct(y, y))

showstat(normsqbyDot)


normsqbyDot := proc()
local theArgs, arg, look, me, cf, term;
   1   me := eval(procname,1);
   2   theArgs := args;
   3   look := tablelook(('procname')(theArgs),'[`/POS`(1,normsqbyDot,1), `/BIND`(1,1,`/y1`::VectorCalculus:-Vector), `/PATTERN`(`/y1`^2)]');
   4   if look <> FAIL then
   5     eval(look,`/FUNCNAME` = procname)
       else
   6     ('procname')(theArgs)
       end if
end proc

 

define, "%1 is assigned", normsqbyMatrixProduct

showstat(normsqbyMatrixProduct)


normsqbyMatrixProduct := proc()
local theArgs, arg, look, me, cf, term;
   1   me := eval(procname,1);
   2   theArgs := args;
   3   look := tablelook(('procname')(theArgs),'[`/POS`(1,normsqbyMatrixProduct,1), `/BIND`(1,1,`/y1`::Matrix), `/PATTERN`(`/y1`^2)]');
   4   if look <> FAIL then
   5     eval(look,`/FUNCNAME` = procname)
       else
   6     ('procname')(theArgs)
       end if
end proc

 

normsqbyDot(`<,>`(2, 3))

Error, (in rtable/Power) exponentiation operation not defined for Vectors

 

normsqbyMatrixProduct(VectorCalculus:-`<,>`(2, 3))

normsqbyMatrixProduct(Vector(2, {(1) = 2, (2) = 3}, attributes = [coords = cartesian]))

(5)

convert(n*ormsqbyMatrixProduct(`<,>`(2, 3)), float)

n*ormsqbyMatrixProduct(Vector(2, {(1) = 2, (2) = 3}, attributes = [coords = cartesian]))

(6)

NULL

# Since I do not have any idea of how to get vectors nicely, ...

... I replace U0, U1, U2 by u,v,w and use difftables U,V,W.  And y1, y2 replaced by y,z.

with(PDEtools); -1; with(plots)

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(7)

declare(u(y, z), v(y, z), w(y, z), q1(y, z), r1(y, z), s1(y, z), q2(y, z), r2(y, z), s2(y, z), F1(y, z), F2(y, z)):

u(y, z)*`will now be displayed as`*u

 

v(y, z)*`will now be displayed as`*v

 

w(y, z)*`will now be displayed as`*w

 

q1(y, z)*`will now be displayed as`*q1

 

r1(y, z)*`will now be displayed as`*r1

 

s1(y, z)*`will now be displayed as`*s1

 

q2(y, z)*`will now be displayed as`*q2

 

r2(y, z)*`will now be displayed as`*r2

 

s2(y, z)*`will now be displayed as`*s2

 

F1(y, z)*`will now be displayed as`*F1

 

F2(y, z)*`will now be displayed as`*F2

(8)

NULL

M := `<|>`(`<,>`(2, -1), `<,>`(-1, 2))

M := Matrix(2, 2, {(1, 1) = 2, (1, 2) = -1, (2, 1) = -1, (2, 2) = 2})

(9)

1/M

Matrix([[2/3, 1/3], [1/3, 2/3]])

(10)

 

# The system

 

EQ0 := Typesetting:-delayDotProduct(`<|>`(F1, F2), Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2))+`-`(`<,>`(U[y], V[z])))+`-`(Typesetting:-delayDotProduct(VectorCalculus:-`*`(1/4, (Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2))+`-`(`<,>`(U[y], V[z])))^%T), Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2))+`-`(`<,>`(U[y], V[z]))))+`-`(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(VectorCalculus:-`*`(1/2, `<|>`(VectorCalculus:-`*`(2, F1)+U[y]+`-`(s1), VectorCalculus:-`*`(2, F2)+V[z]+`-`(s2))), 1/M), `<,>`(q1, q2)))

F1*((2/3)*q1+(1/3)*q2-(diff(u(y, z), y)))+F2*((1/3)*q1+(2/3)*q2-(diff(v(y, z), z)))-((1/6)*q1+(1/12)*q2-(1/4)*(diff(u(y, z), y)))*((2/3)*q1+(1/3)*q2-(diff(u(y, z), y)))-((1/12)*q1+(1/6)*q2-(1/4)*(diff(v(y, z), z)))*((1/3)*q1+(2/3)*q2-(diff(v(y, z), z)))-((2/3)*F1+(1/3)*(diff(u(y, z), y))-(1/3)*s1+(1/3)*F2+(1/6)*(diff(v(y, z), z))-(1/6)*s2)*q1-((1/3)*F1+(1/6)*(diff(u(y, z), y))-(1/6)*s1+(2/3)*F2+(1/3)*(diff(v(y, z), z))-(1/3)*s2)*q2

(11)

EQ00 := VectorCalculus:-`+`(VectorCalculus:-`+`(Typesetting:-delayDotProduct(`<|>`(F1, F2), VectorCalculus:-`+`(Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2)), VectorCalculus:-`-`(`<,>`(U[y], V[z])))), VectorCalculus:-`-`(Typesetting:-delayDotProduct(VectorCalculus:-`*`(1/4, VectorCalculus:-`+`(Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2)), VectorCalculus:-`-`(`<,>`(U[y], V[z])))^%T), VectorCalculus:-`+`(Typesetting:-delayDotProduct(1/M, `<,>`(q1, q2)), VectorCalculus:-`-`(`<,>`(U[y], V[z])))))), VectorCalculus:-`-`(Typesetting:-delayDotProduct(Typesetting:-delayDotProduct(VectorCalculus:-`*`(1/2, VectorCalculus:-`+`(VectorCalculus:-`+`(VectorCalculus:-`*`(2, `<|>`(F1, F2)), `<|>`(U[y], V[z])), VectorCalculus:-`-`(`<|>`(s1, s2)))), 1/M), `<,>`(q1, q2))))

F1*((2/3)*q1+(1/3)*q2-(diff(u(y, z), y)))+F2*((1/3)*q1+(2/3)*q2-(diff(v(y, z), z)))-((1/6)*q1+(1/12)*q2-(1/4)*(diff(u(y, z), y)))*((2/3)*q1+(1/3)*q2-(diff(u(y, z), y)))-((1/12)*q1+(1/6)*q2-(1/4)*(diff(v(y, z), z)))*((1/3)*q1+(2/3)*q2-(diff(v(y, z), z)))-((2/3)*F1+(1/3)*(diff(u(y, z), y))-(1/3)*s1+(1/3)*F2+(1/6)*(diff(v(y, z), z))-(1/6)*s2)*q1-((1/3)*F1+(1/6)*(diff(u(y, z), y))-(1/6)*s1+(2/3)*F2+(1/3)*(diff(v(y, z), z))-(1/3)*s2)*q2

(12)

``

 


 

Download SystemDeclaresBut.mw

 

 

Hi,

What is the procedure to follow for importing a maple file into Mobius?

Thanks

Hey MaplePrimes

I have a problem with opening some of my documents in maple. When i try to open them, a box pops up with the text "How do you want to open this file?" with the options "Maple Text, Plain Text, Maple Inputs". None of these options work (document is blank) and "Plain Text" and "Maple Inputs" causes maple to crash. Is it possible to recover the documents?

ps. when i try to upload one the documents this happens:

 
Maple Worksheet - Error
Failed to load the worksheet /maplenet/convert/Maple_docs_til_mat.mw .

Download Maple_docs_til_mat.mw

Maple_docs_til_mat.mw
 

 

 

 

 

 

 

Hi all,

 

I attached a program here and the desire is the calculation of Nu.As you could see through the attached file, the F2(r) function contains an 'integral' which makes it difficult if I want to calculate F2(r=1) and it goes the same for D(F2)(r=\phi). So I firstly corrected the F2(r) function as FF2(r) in which the parameter R is calculated in the top of the file. Afte I replace the values of \phi and 1 in the FF2(r) not in F2(r) just because of the integral. The Nu is calculated finally, but it differs from the initial guess. How could I make a loop in order to correct the initial guess by replacing the first Nu calculated in the end of the program??

Ther is a problem and that is the "k" which must be entered in this part in each loop:

 

Digits:= 10:

K:=Nu->( k )

 

I do not know whether or not it is possible to change it so that the program identify the 'k' and replace it in the "K:=Nu->( k )" for k.

 

SolveCode.mw
 

Download SolveCode.mw

 

Numerical evaluation of HeunBPrime fails if abs(z)>1:

HeunBPrime(.2, .3, .4, .5, 1.5);
Warning, breaking the computation of HeunBPrime after 20000 terms, the series is not converging
                      9.604689581*10^15896

while this gives the correct value:

subs(z = 1.5, convert(series(HeunBPrime(.2, .3, .4, .5, z), z = 0, 40), polynom));
                          15.37195056

 

I must be missing something in my Fourier integral.  My understanding is that the sinc function is the transform of a square wave.  In the link below I am getting something slightly different.  I have the parameter tau to define relative to the period, T, to vary the width aspect ratio of the wave,  If tau=T I do get the sinc function.

What am I missing or is what I have correct?

Sq_wave_Fourier_transform.mw

  how can I find equation discribing elliptic intersections and use lagrange to show the higest and lowest value ?    g 

How can i solve this nonlinear equation using adomian decomposition method in maple? 

utt −uxx +u^2 = 6xt(x^2 −t^2)+x^6t^6

I'm having this

2+2;
Typesetting:-mn("4"), [4]

everytime I try a calculation. Could someone explain me what is this typesetting thing, and how can it be prevented? I haven't used Maple for a while and I cannot recall having seen it before. Thank you

Hello.

Please help me. I Have to solve some equations with Adomian Decomposition Method in Maple. But i don't know it.

I just know AGM, HPM and Perturbation Method in Maple.

please send me instructions and codes.

I'm sorry, I can't speak English well. I hope you understand what I mean.

thank you

It seems rather arbitrary that proc..end proc is allowed inside functions, but none of the other statements from ?index,statement are:

seq(try ln(i) catch: -infinity end try, i=0..2)
seq(proc() try ln(i) catch: -infinity end try end proc(), i=0..2)

Only the second one works, even though syntactically it doesn't seem to be different from the first one.

It would be really convenient to have any statement allowed inside a function, including assignments (as :=, not as assign()) and compound statements:

s:=0: seq(s:=s+i, i=1..10)
s:=0: seq(proc() global s:=s+i end proc(), i=1..10)

This is more compact than using a loop.

hello , there , i want ask a Question ,

i have a vector result n hier , and there is a long part with ^1/2 (like unter) , which is not defined before , just from compute ,i want to replace this part with A, and have tried to use subs , but it didnt work . 

And i have tried to define it before compute, and then use subs , aber it also didnt work .

so how can i replace or define this part in the result?

thanks

 

First 123 124 125 126 127 128 129 Last Page 125 of 334