MaplePrimes - Maple 2019 Posts and Questions
http://www.mapleprimes.com/products/Maple/Maple 2019
en-us2021 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemMon, 29 Nov 2021 03:36:08 GMTMon, 29 Nov 2021 03:36:08 GMTMaple 2019 Questions and Posts on MaplePrimeshttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Maple 2019 Posts and Questions
http://www.mapleprimes.com/products/Maple/Maple 2019
Can I change RK45 into RK4?
https://www.mapleprimes.com/questions/233032-Can-I-Change-RK45-Into-RK4?ref=Feed:MaplePrimes:Version Maple 2019
<p>Dear All, If I understood well dsolve uses the RK45 method to solve an ODE. I would like to compare the results of tha attached worksheet with the results of another software that uses RK4 as a standard. Can I adapt my worksheet to use RK4 and how do you do that? Thanks in advance for your willingness to help me out.<a href="/view.aspx?sf=233032_question/QMP_Nov21.mw">QMP_Nov21.mw</a></p>
<p>Dear All, If I understood well dsolve uses the RK45 method to solve an ODE. I would like to compare the results of tha attached worksheet with the results of another software that uses RK4 as a standard. Can I adapt my worksheet to use RK4 and how do you do that? Thanks in advance for your willingness to help me out.<a href="/view.aspx?sf=233032_question/QMP_Nov21.mw">QMP_Nov21.mw</a></p>
233032Thu, 18 Nov 2021 14:55:44 ZFDSFDSWrite output of for loop to .txt file with additional text
https://www.mapleprimes.com/questions/233026-Write-Output-Of-For-Loop-To-txt-File?ref=Feed:MaplePrimes:Version Maple 2019
<p>I have the following code. I want to do the modify it so that:</p>
<p>1. The outputs of each for loop are merged in such a way that the outputs from the first loop (Es) that are also outputs of the second loop (Fs) are removed from the outputs of (Es).</p>
<p>2. The resulting outputs G= .... are saved to a text file, one to each line.</p>
<p>3. In between each output, I want to add 5 lines of text and a blank line, say</p>
<p>text1 text2 text3</p>
<p>text2 text2 text3</p>
<p>text3 text3 text3</p>
<p>text4 text4 text4</p>
<p>text5 text5 text5</p>
<p>(blank line)</p>
<p>so that in the text file, the format is (e.g.)</p>
<p>G={{1,2}};</p>
<p>text1 text2 text3</p>
<p>text2 text2 text3</p>
<p>text3 text3 text3</p>
<p>text4 text4 text4</p>
<p>text5 text5 text5</p>
<p>(blank line)</p>
<p>G={{1,2},{1,3}};</p>
<p>text1 text2 text3</p>
<p>text2 text2 text3</p>
<p>text3 text3 text3</p>
<p>text4 text4 text4</p>
<p>text5 text5 text5</p>
<p>(blank line)</p>
<p>etc.</p>
<p>What is the easiest way to accomplish this?</p>
<pre class="prettyprint">
restart;
with(GraphTheory):
n:= 4:
L:= NonIsomorphicGraphs
( n,
output=iterator,
outputform=graph):
Es:= Array
( [ seq
( Edges( L() ),
j=1..NonIsomorphicGraphs
( n,
output=count
)
)
]
):
M:= NonIsomorphicGraphs
( n-1,
output=iterator,
outputform=graph):
Fs:= Array
( [ seq
( Edges( M() ),
j=1..NonIsomorphicGraphs
( n-1,
output=count
)
)
]
):
;
numelems(Es):
for i from 1 to numelems(Es) do G:=Es[i]: od;
numelems(Fs):
for i to numelems(Fs) do G := Fs[i]; od;
</pre>
<p>I have the following code. I want to do the modify it so that:</p>
<p>1. The outputs of each for loop are merged in such a way that the outputs from the first loop (Es) that are also outputs of the second loop (Fs) are removed from the outputs of (Es).</p>
<p>2. The resulting outputs G= .... are saved to a text file, one to each line.</p>
<p>3. In between each output, I want to add 5 lines of text and a blank line, say</p>
<p>text1 text2 text3</p>
<p>text2 text2 text3</p>
<p>text3 text3 text3</p>
<p>text4 text4 text4</p>
<p>text5 text5 text5</p>
<p>(blank line)</p>
<p>so that in the text file, the format is (e.g.)</p>
<p>G={{1,2}};</p>
<p>text1 text2 text3</p>
<p>text2 text2 text3</p>
<p>text3 text3 text3</p>
<p>text4 text4 text4</p>
<p>text5 text5 text5</p>
<p>(blank line)</p>
<p>G={{1,2},{1,3}};</p>
<p>text1 text2 text3</p>
<p>text2 text2 text3</p>
<p>text3 text3 text3</p>
<p>text4 text4 text4</p>
<p>text5 text5 text5</p>
<p>(blank line)</p>
<p>etc.</p>
<p>What is the easiest way to accomplish this?</p>
<pre class="prettyprint">
restart;
with(GraphTheory):
n:= 4:
L:= NonIsomorphicGraphs
( n,
output=iterator,
outputform=graph):
Es:= Array
( [ seq
( Edges( L() ),
j=1..NonIsomorphicGraphs
( n,
output=count
)
)
]
):
M:= NonIsomorphicGraphs
( n-1,
output=iterator,
outputform=graph):
Fs:= Array
( [ seq
( Edges( M() ),
j=1..NonIsomorphicGraphs
( n-1,
output=count
)
)
]
):
;
numelems(Es):
for i from 1 to numelems(Es) do G:=Es[i]: od;
numelems(Fs):
for i to numelems(Fs) do G := Fs[i]; od;
</pre>
233026Tue, 16 Nov 2021 04:01:08 Zmaplefan123maplefan123How do I solve differential equation in Maple and escape from RootOf?
https://www.mapleprimes.com/questions/232990-How-Do-I-Solve-Differential-Equation?ref=Feed:MaplePrimes:Version Maple 2019
<p><a href="/view.aspx?sf=232990_question/elctroWav.mw">elctroWav.mw</a> have the equation 1 :</p>
<p>eq1 := 2*m*(E + e0^2/(rb*rho))*g(rho, t)*(-rb*rho + R)/(h^2*R) + R*(diff(g(rho, t), rho, rho)*(-rb*rho + R)/R - 2*diff(g(rho, t), rho)*rb/R)/(rb^3*rho) - diff(g(rho, t), t, t)*(-rb*rho + R)/(a^2*c^2*R) = 0;</p>
<p>with iv1:</p>
<p>iv1 := D[1](g)(0, 0) - g(0, 0)*rb/R = rb*R, g(1, 0)*(R - rb)/R = 0, D[2](g)(rb, 0) = a*c;</p>
<p>As in maple document electroWav.mw</p>
<p>The issue is that there is an unsolved part with RootOf how can I rezolve it?</p>
<p>-R*h^2*RootOf(AiryBi(-(R*_Z^3*h^2 + 2*e0^2*m*rb^2)/(_Z^2*R*h^2)))^3</p>
<p>Please advice...</p>
<p><a href="/view.aspx?sf=232990_question/elctroWav.mw">elctroWav.mw</a> have the equation 1 :</p>
<p>eq1 := 2*m*(E + e0^2/(rb*rho))*g(rho, t)*(-rb*rho + R)/(h^2*R) + R*(diff(g(rho, t), rho, rho)*(-rb*rho + R)/R - 2*diff(g(rho, t), rho)*rb/R)/(rb^3*rho) - diff(g(rho, t), t, t)*(-rb*rho + R)/(a^2*c^2*R) = 0;</p>
<p>with iv1:</p>
<p>iv1 := D[1](g)(0, 0) - g(0, 0)*rb/R = rb*R, g(1, 0)*(R - rb)/R = 0, D[2](g)(rb, 0) = a*c;</p>
<p>As in maple document electroWav.mw</p>
<p>The issue is that there is an unsolved part with RootOf how can I rezolve it?</p>
<p>-R*h^2*RootOf(AiryBi(-(R*_Z^3*h^2 + 2*e0^2*m*rb^2)/(_Z^2*R*h^2)))^3</p>
<p>Please advice...</p>
232990Sat, 06 Nov 2021 14:43:21 ZmichaelviomichaelvioCannot solve ODE numerical
https://www.mapleprimes.com/questions/232961-Cannot-Solve-ODE-Numerical?ref=Feed:MaplePrimes:Version Maple 2019
<p>Dear Collaboratory, as a former mathcad user I am trying to transfer slowly towards Maple. In the attached file I have a problem in solving the ODE numerical. I would appreciate it if someone would be willing to help me out. I tried to upload my maple file but I am not sure it is attached.</p>
<p>Dear Collaboratory, as a former mathcad user I am trying to transfer slowly towards Maple. In the attached file I have a problem in solving the ODE numerical. I would appreciate it if someone would be willing to help me out. I tried to upload my maple file but I am not sure it is attached.</p>
232961Fri, 29 Oct 2021 09:11:18 ZFDSFDSHow do I solve this equation in Maple?
https://www.mapleprimes.com/questions/232945-How-Do-I-Solve-This-Equation-In-Maple?ref=Feed:MaplePrimes:Version Maple 2019
<p>Hello everyone.</p>
<p>Please help me solve this equation for <strong>u</strong> using Maple.</p>
<p><img alt="Div(u) = d(ru)/(dr)*1/r = 2*a = const; u = u(r);" src="https://www.mapleprimes.com/MapleImage.ashx?f=e1480a973b97fd57d1e1dbafa1997d8f.gif"></p>
<table align="center" width="768">
<tbody>
<tr>
<td>
<p align="left"><img alt="``" height="23" src="https://www.mapleprimes.com/ViewTemp.ashx?f=193593_1635174438/de7282b2092d29240cfa5cfa13fca852.gif" width="11"></p>
<p align="left"><img alt="Divergence(u) = d(ru)/(r*dr) and d(ru)/(r*dr) = 2*a and 2*a = const" height="42" src="https://www.mapleprimes.com/ViewTemp.ashx?f=193593_1635174438/f134c69e16d081e24dc1da661cd72001.gif" width="263"></p>
<p align="left"><img alt="u = u(r)" height="23" src="https://www.mapleprimes.com/ViewTemp.ashx?f=193593_1635174438/12b6cdc8d61c08e2608b11880b0e1ec9.gif" width="55"></p>
</td>
</tr>
</tbody>
</table>
<p><br>
Thanks in advance for your help.</p>
<p>Hello everyone.</p>
<p>Please help me solve this equation for <strong>u</strong> using Maple.</p>
<p><img alt="Div(u) = d(ru)/(dr)*1/r = 2*a = const; u = u(r);" src="https://www.mapleprimes.com/MapleImage.ashx?f=e1480a973b97fd57d1e1dbafa1997d8f.gif" /></p>
<table align="center" width="768">
<tbody>
<tr>
<td>
<p align="left"><img alt="``" height="23" src="https://www.mapleprimes.com/ViewTemp.ashx?f=193593_1635174438/de7282b2092d29240cfa5cfa13fca852.gif" width="11" /></p>
<p align="left"><img alt="Divergence(u) = d(ru)/(r*dr) and d(ru)/(r*dr) = 2*a and 2*a = const" height="42" src="https://www.mapleprimes.com/ViewTemp.ashx?f=193593_1635174438/f134c69e16d081e24dc1da661cd72001.gif" width="263" /></p>
<p align="left"><img alt="u = u(r)" height="23" src="https://www.mapleprimes.com/ViewTemp.ashx?f=193593_1635174438/12b6cdc8d61c08e2608b11880b0e1ec9.gif" width="55" /></p>
</td>
</tr>
</tbody>
</table>
<p><br />
Thanks in advance for your help.</p>
232945Mon, 25 Oct 2021 15:59:50 ZEugeneKalentevEugeneKalentevChoice of Branch cuts in HeunC
https://www.mapleprimes.com/questions/232944-Choice-Of-Branch-Cuts-In-HeunC?ref=Feed:MaplePrimes:Version Maple 2019
<p>Hi all,<br>
i'm working with the confluent Heun function (Maple 2019).<br>
Since for the case of an integer coefficient delta or gamma there are two integer Frobenius roots at the regular singularities 0 or 1, there is a logarithmic term in the Frobenius solution at these singularities. So, my question is the following:<br>
When moving around this singularity in the complex plane, the value of the logarithmic term might depend on the choice of the complex logarithm's branch cuts. So, does anybody know just about how HeunC is implemented? Is there sth like a power series solution, which value would in my oppinion depend on this choice of a branch cut?<br>
Or is there another implementation that preserves us from this ambiguity in the case of logarithmic singularities (i.e. integer coefficients in the confluent Heun equation)?<br>
<br>
Many thanks,</p>
<p>Hi all,<br />
i'm working with the confluent Heun function (Maple 2019).<br />
Since for the case of an integer coefficient delta or gamma there are two integer Frobenius roots at the regular singularities 0 or 1, there is a logarithmic term in the Frobenius solution at these singularities. So, my question is the following:<br />
When moving around this singularity in the complex plane, the value of the logarithmic term might depend on the choice of the complex logarithm's branch cuts. So, does anybody know just about how HeunC is implemented? Is there sth like a power series solution, which value would in my oppinion depend on this choice of a branch cut?<br />
Or is there another implementation that preserves us from this ambiguity in the case of logarithmic singularities (i.e. integer coefficients in the confluent Heun equation)?<br />
<br />
Many thanks,</p>
232944Mon, 25 Oct 2021 15:03:29 ZSGDASGDA