Kitonum

21153 Reputation

26 Badges

16 years, 217 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Markiyan Hirnyk  The number of normalized Latin squares with this property is 0, which is obvious without any calculations.

@Markiyan Hirnyk 

restart:

Eq:=((diff(R(r), r, r, r, r))*r^4+3*(diff(R(r), r))*r-3*(diff(R(r), r, r))*r^2+2*(diff(R(r), r, r, r))*r^3-3*R(r)+4*R(r)*n+2*R(r)*n^2-4*(diff(R(r), r))*r*n+2*(diff(R(r), r))*r*n^2+4*(diff(R(r), r, r))*r^2*n-2*(diff(R(r), r, r))*r^2*n^2-4*R(r)*n^3+R(r)*n^4)/r^4 = (-108-1362*n+2122*n^2+2019*n^3-3032*n^4+401*n^7+1192*n^6-1033*n^5-25*n^9+6*n^10-180*n^8-4128*r^(n+3)*n^3+2304*r^(n+3)*n-576*r^(n+5)*n-760*n^6*r+575*n^5*r-244*n^7*r-2108*n^3*r-11616*r^(n+3)*n^4-5280*r^(n+3)*n^5-456*n^2*r-6912*r^(3*n+3)*n^3+192*r^(n+3)*n^7-6*n^10*r+152*n^8*r+13*n^9*r-192*r^(n+5)*n^7+4224*r^(3*n+3)*n^2-9216*r^(3*n+3)*n^5-16512*r^(3*n+3)*n^4-1632*r^(n+5)*n^6-1536*r^(3*n+3)*n^6-7680*r^(n+5)*n^3-8832*r^(n+5)*n^4-3360*r^(n+5)*n^2-96*r^(n+3)*n^6+2304*r^(3*n+3)*n-5376*r^(n+5)*n^5+2546*n^4*r+4800*r^(n+3)*n^2)/(576*r^4+192*r^4*n^4+1248*r^4*n^3+2688*r^4*n^2+2208*r^4*n):

Sol:=value(dsolve(Eq)):

expand(simplify(subs(n=0, Sol)));

n:=0: expand(dsolve(Eq));

 

@Markiyan Hirnyk 

restart:

Eq:=((diff(R(r), r, r, r, r))*r^4+3*(diff(R(r), r))*r-3*(diff(R(r), r, r))*r^2+2*(diff(R(r), r, r, r))*r^3-3*R(r)+4*R(r)*n+2*R(r)*n^2-4*(diff(R(r), r))*r*n+2*(diff(R(r), r))*r*n^2+4*(diff(R(r), r, r))*r^2*n-2*(diff(R(r), r, r))*r^2*n^2-4*R(r)*n^3+R(r)*n^4)/r^4 = (-108-1362*n+2122*n^2+2019*n^3-3032*n^4+401*n^7+1192*n^6-1033*n^5-25*n^9+6*n^10-180*n^8-4128*r^(n+3)*n^3+2304*r^(n+3)*n-576*r^(n+5)*n-760*n^6*r+575*n^5*r-244*n^7*r-2108*n^3*r-11616*r^(n+3)*n^4-5280*r^(n+3)*n^5-456*n^2*r-6912*r^(3*n+3)*n^3+192*r^(n+3)*n^7-6*n^10*r+152*n^8*r+13*n^9*r-192*r^(n+5)*n^7+4224*r^(3*n+3)*n^2-9216*r^(3*n+3)*n^5-16512*r^(3*n+3)*n^4-1632*r^(n+5)*n^6-1536*r^(3*n+3)*n^6-7680*r^(n+5)*n^3-8832*r^(n+5)*n^4-3360*r^(n+5)*n^2-96*r^(n+3)*n^6+2304*r^(3*n+3)*n-5376*r^(n+5)*n^5+2546*n^4*r+4800*r^(n+3)*n^2)/(576*r^4+192*r^4*n^4+1248*r^4*n^3+2688*r^4*n^2+2208*r^4*n):

Sol:=value(dsolve(Eq)):

expand(simplify(subs(n=0, Sol)));

n:=0: expand(dsolve(Eq));

 

@Markiyan Hirnyk Do you know how many more of these exceptional cases?

Here's another example:

restart:

Eq:=((diff(R(r), r, r, r, r))*r^4+3*(diff(R(r), r))*r-3*(diff(R(r), r, r))*r^2+2*(diff(R(r), r, r, r))*r^3-3*R(r)+4*R(r)*n+2*R(r)*n^2-4*(diff(R(r), r))*r*n+2*(diff(R(r), r))*r*n^2+4*(diff(R(r), r, r))*r^2*n-2*(diff(R(r), r, r))*r^2*n^2-4*R(r)*n^3+R(r)*n^4)/r^4 = (-108-1362*n+2122*n^2+2019*n^3-3032*n^4+401*n^7+1192*n^6-1033*n^5-25*n^9+6*n^10-180*n^8-4128*r^(n+3)*n^3+2304*r^(n+3)*n-576*r^(n+5)*n-760*n^6*r+575*n^5*r-244*n^7*r-2108*n^3*r-11616*r^(n+3)*n^4-5280*r^(n+3)*n^5-456*n^2*r-6912*r^(3*n+3)*n^3+192*r^(n+3)*n^7-6*n^10*r+152*n^8*r+13*n^9*r-192*r^(n+5)*n^7+4224*r^(3*n+3)*n^2-9216*r^(3*n+3)*n^5-16512*r^(3*n+3)*n^4-1632*r^(n+5)*n^6-1536*r^(3*n+3)*n^6-7680*r^(n+5)*n^3-8832*r^(n+5)*n^4-3360*r^(n+5)*n^2-96*r^(n+3)*n^6+2304*r^(3*n+3)*n-5376*r^(n+5)*n^5+2546*n^4*r+4800*r^(n+3)*n^2)/(576*r^4+192*r^4*n^4+1248*r^4*n^3+2688*r^4*n^2+2208*r^4*n):

Sol:=value(dsolve(Eq)):

subs(n=1,Sol);

n:=1: dsolve(Eq);

Conclusion: The decision by value command for any parameters  is incorrect!

@Markiyan Hirnyk Do you know how many more of these exceptional cases?

Here's another example:

restart:

Eq:=((diff(R(r), r, r, r, r))*r^4+3*(diff(R(r), r))*r-3*(diff(R(r), r, r))*r^2+2*(diff(R(r), r, r, r))*r^3-3*R(r)+4*R(r)*n+2*R(r)*n^2-4*(diff(R(r), r))*r*n+2*(diff(R(r), r))*r*n^2+4*(diff(R(r), r, r))*r^2*n-2*(diff(R(r), r, r))*r^2*n^2-4*R(r)*n^3+R(r)*n^4)/r^4 = (-108-1362*n+2122*n^2+2019*n^3-3032*n^4+401*n^7+1192*n^6-1033*n^5-25*n^9+6*n^10-180*n^8-4128*r^(n+3)*n^3+2304*r^(n+3)*n-576*r^(n+5)*n-760*n^6*r+575*n^5*r-244*n^7*r-2108*n^3*r-11616*r^(n+3)*n^4-5280*r^(n+3)*n^5-456*n^2*r-6912*r^(3*n+3)*n^3+192*r^(n+3)*n^7-6*n^10*r+152*n^8*r+13*n^9*r-192*r^(n+5)*n^7+4224*r^(3*n+3)*n^2-9216*r^(3*n+3)*n^5-16512*r^(3*n+3)*n^4-1632*r^(n+5)*n^6-1536*r^(3*n+3)*n^6-7680*r^(n+5)*n^3-8832*r^(n+5)*n^4-3360*r^(n+5)*n^2-96*r^(n+3)*n^6+2304*r^(3*n+3)*n-5376*r^(n+5)*n^5+2546*n^4*r+4800*r^(n+3)*n^2)/(576*r^4+192*r^4*n^4+1248*r^4*n^3+2688*r^4*n^2+2208*r^4*n):

Sol:=value(dsolve(Eq)):

subs(n=1,Sol);

n:=1: dsolve(Eq);

Conclusion: The decision by value command for any parameters  is incorrect!

Look at this (% - your solution):

subs(n=2, %);

Error, numeric exception: division by zero

Look at this (% - your solution):

subs(n=2, %);

Error, numeric exception: division by zero

Obviously, this is Maple's bug!

Obviously, this is Maple's bug!

In your code two errors:

1) You have eight unknowns, but only six equations.

2) In the last line after the T[gi] is ', and should be a comma.

I have solved your example as follows:

restart: with(plots): with(Statistics):

X:=<0, 7.17, 18.11, 34.34, 57.95, 91.84, 139.98, 207.94, 303.48, 437.57, 625.87, 890.96, 1265.91, 1800>:

Y:=<.44, .43, .42, .41, .40, .39, .38, .37, .36, .35, .34, .33, .32, .31>: 

fit:=NonlinearFit(a+b1*exp(-t/c1)+b2*exp(-t/c2),X, Y, t); 

fit1 := plot(fit, t=0..1800, thickness=2):

graph1 := pointplot(X, Y, symbol = BOX, symbolsize=15, axes = BOXED):

display(graph1, fit1);

I have solved your example as follows:

restart: with(plots): with(Statistics):

X:=<0, 7.17, 18.11, 34.34, 57.95, 91.84, 139.98, 207.94, 303.48, 437.57, 625.87, 890.96, 1265.91, 1800>:

Y:=<.44, .43, .42, .41, .40, .39, .38, .37, .36, .35, .34, .33, .32, .31>: 

fit:=NonlinearFit(a+b1*exp(-t/c1)+b2*exp(-t/c2),X, Y, t); 

fit1 := plot(fit, t=0..1800, thickness=2):

graph1 := pointplot(X, Y, symbol = BOX, symbolsize=15, axes = BOXED):

display(graph1, fit1);

@Markiyan Hirnyk Of course, i read about Alec's approach using `if`-construction. This approach does not work for the continuous case, what i also wrote! Another example :

f:=(k1,k2,n1,n2)->int( int( `if` (x*k1/n1 +y*k2/n2+k2/n2 > 1/2 and

x*k1/n1 +y*k2/n2 >1/2, 1, 0), x=0..n1), y=0..n2): 

f(1,2,3,4);

 

But if we replace `if` by piecewise it all works:

f:=(k1,k2,n1,n2)->int( int( piecewise(x*k1/n1 +y*k2/n2+k2/n2 > 1/2 and

x*k1/n1 +y*k2/n2 >1/2, 1, 0), x=0..n1), y=0..n2): 

f(1,2,3,4);

Thus, piecewise-construction has a wider application.

@Markiyan Hirnyk Of course, i read about Alec's approach using `if`-construction. This approach does not work for the continuous case, what i also wrote! Another example :

f:=(k1,k2,n1,n2)->int( int( `if` (x*k1/n1 +y*k2/n2+k2/n2 > 1/2 and

x*k1/n1 +y*k2/n2 >1/2, 1, 0), x=0..n1), y=0..n2): 

f(1,2,3,4);

 

But if we replace `if` by piecewise it all works:

f:=(k1,k2,n1,n2)->int( int( piecewise(x*k1/n1 +y*k2/n2+k2/n2 > 1/2 and

x*k1/n1 +y*k2/n2 >1/2, 1, 0), x=0..n1), y=0..n2): 

f(1,2,3,4);

Thus, piecewise-construction has a wider application.

int(int(`if`(i+j<=8, i*j, 0), i=1..6), j=1..6);

First 125 126 127 128 129 130 131 Page 127 of 131