ecterrab

12714 Reputation

24 Badges

17 years, 263 days

MaplePrimes Activity


These are answers submitted by ecterrab

The latex command got entirely rewritten, from scratch, everything, in Maple 2021. Unfortunately, as a side effect, the latex performance in previous Maples is now out of target. If you post the worksheet you are "Exporting to LaTeX," one could try exporting it using a more modern Maple and post the result here.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

See FunctionAdvisor(WeierstrassP) and the Digital Library of Mathematical Funtions - Chapter 23, Weirstrass Elliptic and Modular Functions. By clicking the plot section that you see when calling the FunctionAdvisor and comparing it with the plots shown by clicking Graphics in the DLMF you see it is the same function. Comparing 23.2.4 of the DLMF with the first formula shown on the Wikipedia page you posted, you see the Wikipedia one is the same. You can also compare with the definitions shown in the Maple help page for WeierstrassP.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft 

Hi Rouben
This is about a new error message in convert/piecewise not caught in time within the internal routines after having computed a solution (for the piecewise form, not the Heaviside form, which requires an optional argument with a method). It is fixed, and the fix is distributed to everybody using Maple 2022 within the Maplesoft Physics Updates v.1257.

PS1: there are other methods that solve the same equation, it is an easy equation; try for instance dsolve(de, [exact]).

PS2: if you find something unclear on the page ?dsolve,parametric, please post the issue, thanks; I will then give it a look.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Your code above executes to the end on my computer. You receive, as you ask, the form of the determining PDE system whose solutions are the symmetries of the ODE system. According to the help page for DeterminingPDE, to search for a special form of the generator you can use its third argument, S described as an "(optional) list with the functional form of the infinitesimals of a symmetry generator". Examples (17) and (18), then (20) and (21) illustrate that.

So what is the special form of the generator you are saying in your question, that you can't figure out how to express it on the computer?

PS: this is your worksheet: Executes_fine.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft.

I do not reproduce your problem. This is what I see:

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1254 and is the same as the version installed in this computer, created 2022, June 21, 12:46 hours Pacific Time.`

(1)

with(Physics); with(Vectors)

Your first input is `#mover(mi("u"),mo("→"))`(t, x, y, z).%Nablatimes `#mover(mi("u"),mo("→"))`(t, x, y, z)

Typesetting[delayDotProduct](u_(t, x, y, z).%Nabla, u_(t, x, y, z), true)

Physics:-`*`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(2)

lprint(%);

Physics:-`*`(u_(t,x,y,z) . %Nabla,u_(t,x,y,z))

 

Your second input means something different: the application of `#mover(mi("u"),mo("→"))`(t, x, y, z).%Nabla to `#mover(mi("u"),mo("→"))`(t, x, y, z), which in the context of Physics:-Vectors is handled by the dot operator, so you get this output

(u_(t, x, y, z).%Nabla)(u_(t, x, y, z))

Physics:-Vectors:-`.`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(3)

lprint(%);

(u_(t,x,y,z) . %Nabla) . u_(t,x,y,z)

 

It works fine using 1D input too

(u_(t, x, y, z) . %Nabla) * (u_(t, x, y, z))

Physics:-`*`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(4)

(u_(t, x, y, z) . %Nabla) . (u_(t, x, y, z))

Physics:-Vectors:-`.`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(5)

(u_(t, x, y, z) . %Nabla)(u_(t, x, y, z))

Physics:-Vectors:-`.`(Physics:-Vectors:-`.`(u_(t, x, y, z), %Nabla), u_(t, x, y, z))

(6)

NULL

 

Download It_works_fine.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


 

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1236 and is the same as the version installed in this computer, created 2022, May 24, 16:31 hours Pacific Time.`

(1)

f := proc (x, y) options operator, arrow; 1/(2+x*y^2) end proc

(D[`$`(1, j), `$`(2, k)](f))(x, y)

pochhammer(-j, j)*(Sum(binomial(k, _k1)*(Sum(pochhammer(2*k-_k1+1, 2*_k1-2*k)*pochhammer(j-k+1, k)*(y^2)^(j-k)/(factorial(_k1-k)*(2*y)^(_k1-2*k)), k = 0 .. _k1))*(Sum(pochhammer(2*k__1-k+_k1+1, 2*k-2*_k1-2*k__1)*pochhammer(-j-k__1, k__1)*x^k__1*(x*y^2+2)^(-1-j-k__1)/(factorial(k-_k1-k__1)*(2*y)^(k-_k1-2*k__1)), k__1 = 0 .. k-_k1)), _k1 = 0 .. k))

(2)

eval(eval(eval(pochhammer(-j, j)*(Sum(binomial(k, _k1)*(Sum(pochhammer(2*k-_k1+1, 2*_k1-2*k)*pochhammer(j-k+1, k)*(y^2)^(j-k)/(factorial(_k1-k)*(2*y)^(_k1-2*k)), k = 0 .. _k1))*(Sum(pochhammer(2*k__1-k+_k1+1, 2*k-2*_k1-2*k__1)*pochhammer(-j-k__1, k__1)*x^k__1*(x*y^2+2)^(-1-j-k__1)/(factorial(k-_k1-k__1)*(2*y)^(k-_k1-2*k__1)), k__1 = 0 .. k-_k1)), _k1 = 0 .. k)), [j = 2, k = 4]), Sum = add), y = 0)

6

(3)

NULL


 

Download DoubleDerivativeComputed.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi
Note there is a green arrow in the toolbar of the window you use to post. Clicking it you can upload a worksheet with the problem. That helps others help you.

Independent of that, take a look at the help page for "?Physics:-ExteriorDerivative"; from what you show, the Physics command is a simpler approach.
 

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi
This is an issue of the integrator, apparently in the piecewise handler. I added a workaround to it directly in the subroutine for integrating Dirac functions which is part of the Physics package. That resolves the isue and the change is included in the latest Maplesoft Physics Updates (v.1234) for Maple 2022.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

To enter the metric use Setup(metric = line_element), check the help page, there is a brief subsection/paragraph for 'metric', scanning and reading only that suffices. The covariant derivative operator is D_; again, see the help page. Then just write those derivatives you mention, as you speak. Depending on the level of details you want, see also ?TensorArray and/or SumOverRepeatedIndices.

By the way In ?Physics (scroll) there is a section called "Brief description of each command" where you can get a quick glance at all the existing Physics functionality and links to the corresponding commands.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Check it out, it does precisely what you are asking for. The command admits several options; the help page (enter ?SortProducts) contains good examples.

By the way In ?Physics (scroll) there is a section called "Brief description of each command" where you can get a quick glance at the existing functionality and links to the corresponding commands.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

The command to use is Library:-SubstituteOperator.

with(Physics); Setup(quantumoperators = {A, B, C})

[quantumoperators = {A, B, C}]

(1)

Setup(algebrarules = {%Commutator(A[m], B[n]) = C[m+n]})

[algebrarules = {%Commutator(A[m], B[n]) = C[m+n]}]

(2)

Library:-SubstituteOperator(A[1]*B[2] = 5, A[1]*B[2]*C[4]+C[3])

5*C[4]+C[3]

(3)

Regarding your use of subs or algsubs, they will work only when the expression being substituted is an operand of the target expression. In your first example, this works

subs(A[1]*B[2] = 5, A[1]*B[2]+C[3])

5+C[3]

(4)

because A[1]*B[2] is an operand of A[1]*B[2]+C[3]. You see that using the op command

A[1]*B[2]+C[3]

Physics:-`*`(A[1], B[2])+C[3]

(5)

op(Physics[`*`](A[1], B[2])+C[3])

Physics:-`*`(A[1], B[2]), C[3]

(6)

You see A[1]*B[2] is the first operand,

op(1, Physics[`*`](A[1], B[2])+C[3])

Physics:-`*`(A[1], B[2])

(7)

NULL


PS: For next questions or posts: note there is a green arrow in the window you write the question, clicking that arrow allows for uploading the worksheet itself, as I am doing now. That helps others reproducing your input without having to retype anything.

Download SubstituteOperator.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Note first that your equation was and is solved by dsolve in terms of Heun functions :

mplinput := (x^4+4*x^3+10*x^2+4*x+1)*(diff(y(x), []))/(4*x^2*(1+x)^2*(x^2+6*x+1))+(2*(x^2+5*x+2))*(diff(y(x), x))/((1+x)*(x^2+6*x+1))+diff(y(x), x, x) = 0

dsolve(mplinput)

y(x) = _C1*x^(1/2)*HeunG(4*2^(1/2)/(3+2*2^(1/2)), (1+2^(1/2))/((3+2*2^(1/2))^3*(-3+2*2^(1/2))^2), 1, 1, 1/2, 1, (x+3+2*2^(1/2))/(3+2*2^(1/2)))*(x+3-2*2^(1/2))^(1/2)/(1+x)^(1/2)+_C2*x^(1/2)*(x^2+6*x+1)^(1/2)*HeunG(4*2^(1/2)/(3+2*2^(1/2)), (1/4)*(18*2^(1/2)+13)/((3+2*2^(1/2))^3*(-3+2*2^(1/2))^2), 3/2, 3/2, 3/2, 1, (x+3+2*2^(1/2))/(3+2*2^(1/2)))/(1+x)^(1/2)

(1)

That said, when indicating the method hypergeometricsols, it was not working as in previous releases; the problem was not related to find_2F1 but related to a mechanism for choosing between Heun and pFq solutions that prioritizes Heun when pFq is expected to be too complicated. I refined that mechanism now, basically: if you ask for pFq then the algorithm will give you pFq regardless of complexity - that is a more proper design, I think. So now we get

dsolve(mplinput, [hypergeometricsols])

y(x) = _C1*x^(1/2)*hypergeom([1/8, 5/8], [1], -16*x^2/((x^2+6*x+1)*(x-1)^2))/((1+x)^(1/2)*(x-1)^(1/4)*(x^2+6*x+1)^(1/8))+_C2*x^(1/2)*hypergeom([1/8, 5/8], [3/4], (1+x)^4/((x^2+6*x+1)*(x-1)^2))/((1+x)^(1/2)*(x-1)^(1/4)*(x^2+6*x+1)^(1/8))

(2)

So thanks for posting this one. The fix is distributed for everybody within the Maplesoft Physics Updates v.1220 and higher.

NULL


 

Download HeunHypergeometric.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

In ?latex, section on tips, you read: "Also, a copy of the maple.sty file, found in the etc directory of your Maple installation (kernelopts(mapledir)), should be in the same directory where you placed the .tex file". That resolves the issue of the commands you do not recognize, and by opening maple.sty in a text editor you can also see what these commands do.

As for "does not display well": Is that the case with or without the maple.sty file? It would help if you could please upload a picture of what looks wrong (after including maple.sty in the right directory, as said above).

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Yes you can use differential operators are operands in a product and with the correct meaning . But you realize, then, in those products the operands do not commute. Use then the Physics package and its functionality about differentialoperators of type algebraic (operands in a product).

 

with(Physics)

 

Setup now three differential operators: you indicate them as a list, where the first element is the differential operator and the second element is in turn a list with the differentiation variables of that operator

Setup(differentialoperators = {[Delta__delta, [t]], [Delta__psi__d, [t]], [Delta__psi__q, [t]]})

[differentialoperators = {[Delta__delta, [t]], [Delta__psi__d, [t]], [Delta__psi__q, [t]]}]

(1)

You see they are displayed in a different color, olive, indicating they are noncommutative with respect to products.

Suppose you want to have "`Delta__delta`=f->(∂)/(∂t) f", then "(Delta[psi])[d]=f->1/t ((∂)/(∂t) f)"

Delta__delta := proc (f) options operator, arrow; diff(f, t) end proc

proc (f) options operator, arrow; Physics:-diff(f, t) end proc

(2)

Delta__psi__d := proc (f) options operator, arrow; (diff(f, t))/t end proc

proc (f) options operator, arrow; Physics:-`*`(Physics:-`^`(t, -1), Physics:-diff(f, t)) end proc

(3)

Your equation now, I am changing composite functions by products to illustrate, but you see how it works that is what matters.

EQ := psi__d0*Delta__delta+psi__q0*D*Delta__delta/`ω__0` = p_*Delta__psi__d/`ω__0`-Delta__psi__q

psi__d0*Delta__delta+psi__q0*D*Delta__delta/omega__0 = p_*Delta__psi__d/omega__0-Delta__psi__q

(4)

 

Multiply this EQ by a product of functions of t times a function of x, to see how it works

EQ*f(t)*g(t)*h(x)

h(x)*(D*psi__q0+psi__d0*omega__0)*Physics:-`*`(Delta__delta, f(t), g(t))/omega__0 = h(x)*Physics:-`*`(p_*Delta__psi__d-Delta__psi__q*omega__0, f(t), g(t))/omega__0

(5)

You see that h(x) passed to the left while f(t)*g(t) remains to the right of the differential operators that act on them (that is so because the product operator Physics:-`*` handles noncommutative objects, including in that differential operators).  Note also that the differential operators you set remain multiplied by the mathematical objects that depend on t. And you can keep computing, simplifying expanding, always keeping the ordering correctly and just using multiplication.

 

But at some point you want to apply these operators, that is: transform these products of differential operators times functions into the application of the operators (2) and (3). You do that using Library:-ApplyProductOfDifferentialOperators. We expect `Δ__δ` and `Δ__ψ__d` to distribute as the linear differential operators defined in (2) and (3) while `Δ__ψ__q` only encloses (applies to) f(t)*g(t) and doesn't expand further because its definition is not know:

 

Library:-ApplyProductsOfDifferentialOperators(h(x)*(D*psi__q0+psi__d0*omega__0)*Physics[`*`](Delta__delta, f(t), g(t))/omega__0 = h(x)*Physics[`*`](p_*Delta__psi__d-Delta__psi__q*omega__0, f(t), g(t))/omega__0)

h(x)*(D*psi__q0+psi__d0*omega__0)*((diff(f(t), t))*g(t)+f(t)*(diff(g(t), t)))/omega__0 = -h(x)*(Delta__psi__q(f(t)*g(t))*omega__0*t-(diff(f(t), t))*g(t)*p_-f(t)*(diff(g(t), t))*p_)/(omega__0*t)

(6)

 

Note the factor t appearing in the denominator of the second term. That is due to the definition (3).

Download differential_operators_as_operands_in_products.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Edgardo S. Cheb-Terrab
Physics, DifferentialEquations and Mathematical Functions, Maplesoft

3 4 5 6 7 8 9 Last Page 5 of 52