LeeHoYeung

Mr. Ho Yeung Lee

535 Reputation

10 Badges

12 years, 234 days

Social Networks and Content at Maplesoft.com

Seldom to ask question after retired math hobby Welcome August, February, July, May born girl And waited for her email to mavio@protonmail.com

MaplePrimes Activity


These are questions asked by LeeHoYeung

int(a(t)*b(t)+2*(diff(a(t), t))*(diff(b(t), t)), a(t));
Error, (in int) integration range or variable must be specified in the second argument, got a(t)
 

do not understand this error message,

how to integrate it?

ha := (diff(c(t), t))/(c(t)*(diff(c(t), t))-c(t));
solve(subs(m=ha,f(m))*subs(m=subs(c(t)=a(t),ha)), f(m)) = subs(m=ha+subs(c(t)=a(t),ha), f(m), f);

just expect to find a function ?
 

1. How to generate times series data that have some logic law

but do not include distributive law?

how to fasten dsolve and is it possible to timeout faster if it know no solution earlier?

i split into near 500 blocks of nested for loop, total around 42 billions trials

i run in cmaple, 

i see it run the first 4 blocks of code and output to files,  which are daff001, daff002, daff003 and daff004

it seems that it can run parallel intelligently though i write in serial lines.

but it run a very long time, still running near first 4000 records

window 10 use 3.4GB memory, only 4GB memory rest

but 4000 records use more than 4GB memory

i just hope to run 1000 records every day, hope 1000 records can be finished within a few hours

and plan to run around 500days

 

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff001.txt");
for ii from 1 to 1 do
for jj from 1 to 1 do
for kk from 1 to 1 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff002.txt");
for ii from 1 to 1 do
for jj from 1 to 1 do
for kk from 1 to 1001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff003.txt");
for ii from 1 to 1 do
for jj from 1 to 1 do
for kk from 1001 to 2001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff004.txt");
for ii from 1 to 1 do
for jj from 1 to 26 do
for kk from 2001 to 2001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

restart:
read "D:\\daff2039mm.m":
with(combinat):
appendto("D:\\daff005.txt");
for ii from 1 to 1 do
for jj from 26 to 51 do
for kk from 2001 to 2001 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii] , mm[jj] , mm[kk] ],[a(t), b(t), c(t)]);
if nops([sol]) = 1 then
print([mm[ii], mm[jj], mm[kk]]);
print(sol);
print(" * **");
end if:
end if:
end if:
od:
gc();
od:
od:

i have already release memory with gc() in the most inner for loop ]

,but it still use up my memory

once it printed two lines each time, actually it can release memory

but why it still use up memory

read "D:\\hello.m":
with(combinat):
appendto("D:\\gogogo.txt");
for ii from 1 to 2040 do
for jj from 1 to 2040 do
for kk from 1 to 2040 do
if ii < jj and jj < kk then
if mm[ii] <> mm[jj] and mm[jj] <> mm[kk] then
sol := dsolve([mm[ii],mm[jj],mm[kk]],[a(t),b(t),c(t)]);
print([mm[ii],mm[jj],mm[kk]]);
print(sol);
print("***");
end if:
end if:
od:
gc();
od:
od:

 

i can only think

use c# to generate code with file write, nested for loop every 1000 records 

is it the only way to do?

 

int counter = 0;
for (int i=1; i<=2040; ++i)
{
for (int j = 1;j <= 2040; ++j)
{
for (int k = 1; k <= 2040; ++k)
{
if(counter % 1000 == 0)
{
Console.Write(i.ToString() + ","+j.ToString() + ","+k.ToString());
Console.Write("\r\n");
}
counter = counter + 1;
}
}
}

 

First 43 44 45 46 47 48 49 Last Page 45 of 141