Maple 12 Questions and Posts

These are Posts and Questions associated with the product, Maple 12

F(n,n+1),2) = F(Product(x, k=1..n), 2)

how to solve function F?

Update
 

Above equation is wrong, below is newly updated 

Expect F is product operator

F(2,3) + 2 = F(2,4)

F(3,4) + 3 = F(3,5)

solve([ F(1,2)+1=F(1,3), F(n,n+1) + n = F(n,n+2), F(n,n+1)= F(summation(k,k=1..n),2)],F) assuming n > 0

Expect F is new operator
solve([ F(1,2)*1=F(1,3), n*F(n,n+1) = F(n,n+2), F(n,n+1)= F(product(k,k=1..n),2)],F) assuming n > 0

Dear all
Using cubic spline interpolation to interpolate a given function I get  
the follwoing error
Warning, solving for expressions other than names or functions is not recommended.
Error, (in solve) list of unknowns contains repeated elements: [1, 0]

and  why the  spline funciton obtained by this code is different to the one given by Maple's built in package.

inter.mw

Thank you for any help 

Dear all

I solve a given pde with some conditions given, but I get 

unable to handle PDE problem subject to boundary conditions 

solution_pdes.mw

many thanks for your help

 

 

Dear all

for a fixed x positive, I would like to find an asymptotic expansion of the following integral when n goes to infinity. 

int(exp(-n*(x*cosh(t)+t)), t = 0 .. infinity)

Maybe we can define 
f:=n->int(exp(-n*(x*cosh(t)+t)), t = 0 .. infinity);
Then 

asympt(f(n), n,2)
But doesn't work

Many thanks for your help 

 

Dear all

I have a nonlinear PDE, I use a transformation depend on some paramaters I would like to find the scalling parameters so that the pde is invariant under the proposed transformation.

PDes_invariant_under_transformation.mw

Thak you for your help 

 

Would like to export a list into a text file

when I tried , it show ... 1234 items... , can not export a whole list into text file.

[[[0,0,0,0]], [[0,0,0,0]], .....]
thousands of [[...]] elements

 

Dear all

I would like to solve a fourth order PDEs, using fourier transform. 

How can I apply fourier transform to get solution of my problem

Fourier_transform.mw

Thank you 

Dear all

I compute the solution of a system of ordinary differential equaiton using Picard iteration. I have the following error:

Error, invalid input: f uses a 2nd argument, y, which is missing

My code 

Picard_iteration.mw

Thank you for any help 

 

[[1,1,["ab","xy"]], [0,1,["xy"]]]
 

how to sort by first number , second number , and list of string ?

how to count and group by third list of strings having first two number 0,0 or 0,1 or 1,0 or 1,1 

for example 

["xy"] at most count 4  , at least count 1

would like to find which is [1,1,... ] and only count 1

 

second has rsolve solution

compare original sequence

accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])),

with rsolve solution , it start from third number wrong, some number are wrong but correct at next number, 

but i just want to guess next number is 1 or 2

[seq(subs(k=kk, sol), kk=0..(lengthofsequence+1))],

with(SumTools):
with(gfun):
accsum := proc(xx)
local result,mm:
result := []:
for mm from 1 to nops(xx) do
temp := Summation(xx[k], k = 1 .. mm):
result := [op(result), temp]:
od:
return result:
end proc:


patterngroup := [2, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1]: # left is latest, 2,1,1..
lengthofsequence := 5:
for mm from 1 to 12 do
if guessgf(accsum(Reverse([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])), x) = FAIL then
print(patterngroup[mm]):
else
sol := rsolve(listtorec(accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])), u(n))[1], u(k)):
acxxc := accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])):
olist := [seq(patterngroup[k], k=(mm)..(mm+5))]:
#start from 0
print(patterngroup[mm], olist, accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])), [seq(subs(k=kk, sol), kk=0..(lengthofsequence+1))], sol, subs(k=(lengthofsequence+1), sol), subs(k=(lengthofsequence+1), sol)-acxxc[nops(acxxc)]):
end if:
od:
 

How to pdsolve(diff( f(a,b), a+b) = diff( f(a,b),a))?

buy := proc(ss,windowlength,syseq1,syseq2a,syseq2b)
try:
p := dualaxisplot(listplot(ma, color = red), listplot(me, color = blue), style = line, gridlines = false);
catch:
p := dualaxisplot(listplot(me, color = red), listplot(me, color = blue), style = line, gridlines = false);
end try:
return p:
end proc:


CheckGraph := proc(text,graphparam1,graphparam2)
  local maplet, choice:
  maplet := Maplet(
    [
      [Plotter['PL1'](graphparam1)],
      [Plotter['PL2'](graphparam2)],
      #[Plotter['PL2'](graphparam2)],
      [text, ComboBox['CoB1']("No Refund", sort(["Jackpot"], lexorder))],
      [Button("OK", Shutdown(['CoB1'])), Button("Cancel", Shutdown())]
    ],
  ):
  choice := Maplets[Display](maplet):
end proc:

graph1 := buy(0,100,rhs(sol[parse(result1[1])][1]),rhs(sol[1][1]),rhs(sol[2][1]));

>graph1
can show graph but after using Plotter['PL1'] , it can not show graph in dialog

CheckGraph("Has Jackpot?",graph1,graph2):

 

how to plot dualaxisplot in dialog?

would like to show a list system one by one and ask question and wait for answer and then plot graph and ask question and wait for answer and then show next system ask question and contiune this for loop

but my script show all system at once but can not one by one and no pop up dialog and no wait for answer

how to do?

 

restart:
interface(prettyprint=2):
with(ListTools):
with(StringTools):
with(ExcelTools):
with(SumTools):
with(Maplets[Elements]):
count := 1:

RR := Import("C:\\Users\\ohungyeeel\\Documents\\EquationsLists.xls", "Candidate", "A1:Q65535"):

for mm from 2 to 20 do

try:
if RR[count,13] = "Complex" or RR[count,13] = "Beautiful system but no result" then
dummy := 0:
else
print(RR[count,1],RR[count,2]):
sol := solve(RR[count,2]):
print("Source:",RR[count,3]):
print("Solution:",sol):

choosesystem := Maplet(InputDialog['ID1']("Choose system?", 'Yes1' = Shutdown(['Yes']), 'No1' = Shutdown(['No']))):
Maplets[Display](maplet):

if choosesystem = "Yes" then
RR[count,15] := "SystemChosenAndSolutionCorrect":
else
RR[count,15] := "NotChosenAndSolutionWrong":
end if:

plot(sol):

choosesystem := Maplet(InputDialog['ID1']("Like and it works?", 'Yes1' = Shutdown(['Yes']), 'No1' = Shutdown(['No']))):
Maplets[Display](maplet):

if choosesystem = "Yes" then
RR[count,16] := "Best":
else
RR[count,16] := "NotSelected":
end if:

end if:

catch:
print("error at ",RR[count,1],RR[count,2]):
end try:

count := count + 1:
od:
Export(RR, "C:\\Users\\ohungyeeel\\Documents\\EquationsLists10092020.xls", "Candidate", "A1"):

interface(prettyprint=2):
with(ListTools):
with(StringTools):
for xx from 1 to 2 do
xx := 1:
Source := FileTools[Text][ReadFile](cat("C:\\hello\\probability1-200-26042020\\home\\probability",xx,"\\probability",xx,".txt")):
openindex := [SearchAll("[",Source)]:
endindex := [SearchAll("]",Source)]:
beforefiltered := []:
for mm from 1 to nops(openindex) do
if mm > 27 then
beforefiltered := [op(beforefiltered), Chop(substring(Source, openindex[mm]..endindex[mm]))]:
end if:
od:
afterfiltered := []:
for mm in beforefiltered do
if Has(mm,"--") or Has(mm,"|") or Has(mm,"{") or Has(mm,"}") then
dummy := 0:
elif Has(mm,"Root") then
dummy := 0:
else
afterfiltered := [op(afterfiltered),mm]:
end if:
od:
afterfiltered[1];

however after chop still has new line, can not make a beautiful csv format, 

"[b(t,k)+ a
(t,k)*
x(t,k)]"

# I try to export to text first and then use Excel to use "|" as delimiter instead comma as delimiter,
#because b(t,k) has comma "," will separate to open a new column

appendto("C:\\Users\\Student\\Documents\\IQ1-200csv.txt"):
for mm in afterfiltered do
AA := parse(mm):
lprint(xx,"|","hello := [","|",AA[1],"|",AA[2],"|","]:");
od:
od:

Expect csv in format
1,b(t,k)+a(t,k)*x(t,k)
2,a(t,k)+s(t,k)*z(t,k)

There are 3 lists of data 

how to plot 3 lines with x axis represent time 1,2,3...

 

1 2 3 4 5 6 7 Last Page 2 of 32