Kitonum

21550 Reputation

26 Badges

17 years, 123 days

MaplePrimes Activity


These are answers submitted by Kitonum

To solve the problem you need to determine the values ​​of all the parameters, specify the initial conditions and assign names to the found solutions.

Example:

restart;

x, y, m, n:=1, 2, 3, 4:

sol:=dsolve({(D(a))(t) = x-y*a(t), (D(b))(t) = m*a(t)-n*b(t), a(0)=0, b(0)=0.5}, {a(t), b(t)});

a:=unapply(rhs(sol[1]), t);

b:=unapply(rhs(sol[2]), t);

plot(60/0.98 * a(t)*b(t), t=0..10, labels=["t", "h(t)"]);

In my code, I relied on your formula, in which the number  n  determines the size of the segment of the boundary value problem and the number of parts into which divided this segment. If we divide these two parameters, we obtain a slightly more general problem. The number  theta can also be considered discretely as in your formula, and it can more accurately be considered by the integral, if your last formula to the limit as  n  tends to infinity. In the example below 0.001 step corresponds to the division of the interval from 0 to 3 per 3000 parts:

restart;

a:=3:  n:=3000:

ode:=diff(T(x),x$2)-T(x)^2=0;

bc:=T(0)=1,T(a)=0;

V:=dsolve({ode, bc}, numeric):

AverageT:=evalf(Int(x->rhs(V(x)[2]), 0..a))/a;

`T`:=[seq(rhs(V(x)[2]), x=a/n..a, a/n)]:

Int_theta:=evalf(sqrt(Int(x->(rhs(V(x)[2])-AverageT)^2, 0..a)/a)/AverageT);

theta:=sqrt(add((`T`[i]-AverageT)^2, i=1..n)/(n-1))/AverageT;

 

If   increases, the theta will be close to  Int_theta .

restart;

n:=3:

ode:=diff(T(x),x$2)-T(x)^2=0;

bc:=T(0)=1,T(n)=0;

V:=dsolve({ode, bc}, numeric);

AverageT:=evalf(Int(x->rhs(V(x)[2]), 0..3))/n;

`T`:=[seq(rhs(V(x)[2]), x=1..3, 1)];

theta:=sqrt(add((`T`[i]-AverageT)^2, i=1..3)/(n-1))/AverageT;

Solution by substitution  x-1=t^2 :

eq1:=sqrt(x+3-4*sqrt(x-1))+sqrt(x+8-6*sqrt(x-1))=1:

eq2:=x-1=t^2:

simplify(algsubs(eq2, eq1)) assuming t>=0;

sol:=solve(%);

L:=convert(sol, list);

x:=unapply(solve(eq2, x), t);

RealRange(x(L[1]), x(L[2]));  # All roots of the initial equation

 

Of course, after the equation is solved with respect to  t , it is easier to solve it by hand for  x , using the equality x=1+t^2

On the solution of discrete optimization problems, see ?DirectSearch[Search].

Solution of the problem:

The example shows that the solution of such problems with DirectSearch package is not effectively.

integer.mw

Your problem is easily solved by exhaustive search. Denoted by  a, b, c, d, e, f, g, h  vertices of the cube:

Code:

L:=combinat[permute]({seq(i^2, i=1..8)}):

n:=infinity: S:={}:

for i in L do

a, b, c, d, e, f, g, h := i[1], i[2], i[3], i[4], i[5], i[6], i[7], i[8]:

m := a*b+b*c+c*d+a*d+a*e+b*f+c*g+d*h+e*f+f*g+g*h+e*h: S:=S union {m}:

if m<n then n:=m:

M:=[m, ["a"=a, "b"=b,"c"= c, "d"=d, "e"=e, "f"=f, "g"=g, "h"=h]]:  fi:

od:

S:  # The set of all possible values of this sum 

nops(S);

max(S);

min(S);

M; 


622

9420

3586 

[3586, ["a" = 1, "b" = 36, "c" = 9, "d" = 64, "e" = 49, "f" = 16, "g" = 25, "h" = 4]]


 

For details see  ?rtable_indexing

f := 1/3 + x/5:

numer(f)/convert(denom(f), symbol);

     

There are a few extra parentheses and if..end if also not necessary:

aprcos:=proc(x,n::nonnegint)

local resp, i;

resp:=0;

for i from 0 to n do

resp:=resp+(-1)^i*x^(2*i)/(2*i)!;

end do;

resp;

end proc;

c:=Array([1, 3, 5, 7, 8, 2, 1]):

ArrayNumElems(c);

             7

We have a Diophantine equation  4^27+4^1016+4^n=m^2. Rewrite it as follows

4^1016+4^27=(m-2^n)*(m+2^n)

 Hence we find that  2^n<4^1016+4^27 .  Should be n <2033, as

is(2^2033>4^1016+4^27);

               true

So it is enough to make exhaustive search for  n  from 1 to 2032:

L:=[]:

for n from 1 to 2032 do

m:=sqrt(4^27+4^1016+4^n):

if type(m, integer) then L:=[op(L), n]:  fi:

od:

L; 

         [522, 2004]


plot3d(5, x = -3*Pi .. 3*Pi, y = (1/2)*sin(x) .. (1/2)*sin(x)+4, color = white, filled = true, scaling = constrained, grid = [50, 11], orientation = [93, -14, -23], axes = none, lightmodel = light1);


plot3d(5, x = -3*Pi .. 3*Pi, y = (1/2)*sin(x) .. (1/2)*sin(x)+4, color = white, filled = true, scaling = constrained, numpoints = 2500, orientation = [93, -14, -23], axes = none, lightmodel = light1);

Unfortunately, Maple cannot cope with this task:

assume(m, posint, n, posint):

is((2*m-1)^(2^n)-1 mod 2^(n+2) =0);

                             FAIL

But the problem is easily solved manually by induction, if we use the identity

(2*m-1)^(2^(n+1))-1=( (2*m-1)^(2^n)-1 )*((2*m-1)^(2^n)+1)

Change in the normal curve   phi(x)=1/(sigma*sqrt(2*Pi))*exp(-(x-a)^2/(2*sigma^2))  as the parameter  a  is changing from  -2  to  3  (sigma=1) :

plots[animate](plot,[1/sqrt(2*Pi)*exp(-(x-a)^2/2),x=-5..6,thickness=2],a=[seq(-2+0.02*k,k=0..250)]);

 

Change in the normal curve   phi(x)=1/(sigma*sqrt(2*Pi))*exp(-(x-a)^2/(2*sigma^2))  as the parameter  sigma  is changing from  0.6  to  2  (a=1) :

plots[animate](plot,[1/sigma/sqrt(2*Pi)*exp(-(x-2)^2/2/sigma^2),x=-2..6,thickness=3],sigma=[ seq(0.6+k*0.005,k=0..280)]);

First 271 272 273 274 275 276 277 Last Page 273 of 290