Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are answers submitted by Kitonum

solve({30+1144*r^4-832*r^2=0, r>0});

 

DirectSearch  found  4 solutions in the specified ranges. It is very likely that there is no other positive solutions:

 

restart;

interface(rtablesize = infinity):

f := r*(8-2*x^2):

g := subs(x = f, f):

h := subs(x = g, g):

eq1 := expand(h-x):

eq2 := expand(diff(h, x)+1):

DirectSearch[SolveEquations]([eq1, eq2], [r = 0 .. 20, x = 0 .. 20], AllSolutions);

 

 

You can download  DirectSearch  package from 

http://www.maplesoft.com/applications/view.aspx?SID=101333

 

Your system is very complicated and I think that it can only be solved numerically, for example, with  fsolve  command. Only this command gives one solution, and the plot shows that there are many solutions. To find other solutions you can use this command with the appropriate option, taking the approximate solutions of the plot:

restart;

f:=r*(8 - 2*x^2);

g:=subs(x=f,f);

h:=subs(x=g,g);

eq1:= expand(h-x);

eq2:= expand(diff(h,x) + 1);

 

Sol:=fsolve({eq1, eq2});

P:=eval([r,x], Sol):

A:=plottools[disk](P, 0.02, color=green): # Green point is the obtained solution

B:=plots[implicitplot]([eq1, eq2], r=0..1, x=0..2.5, color=[red, blue], numpoints=100000):

plots[display](A, B, scaling=constrained);

 

 

Example

plot(sin(3*phi), phi = 0 .. 2*Pi, coords = polar, scaling = constrained, axes = box);

 

 

Example:

f:=(x,y)->x^2+x*y+y^3;
D[1](f)(x,y);

 or

f:=x->x^2+x*y+y^3;
D(f)(x);
int(f(x), x);

 

 

Maybe instead of  exp(k)  should be  lambda^k? (Poisson formula in probability theory).

In both cases no solution. See the plot:

lambda:=2:
 plot(exp(-lambda)*lambda^k/k!, k=0..10);

 

Refine formulation of the problem!

without parentheses with Carl's improvement:

P(z) := (1 + z^(-1))^2*(1 + z)^2*(r[1]*z + r[0] + r[1]*z^(-1)):   

add(coeff(P(z),  z, n)*z^`if`(n<=0,-n, convert(-n, symbol)), n= ldegree(P(z),z)..degree(P(z),z));

 

 

 

P(z) := (1 + z^(-1))^2*(1 + z)^2*(r1*z + r0 + r1*z^(-1)); 

add(coeff(P(z),  z, n)*z^(``(-n)), n=-3..3);  

add(coeff(P(z),  z, n)*z^(`if`(n<=0,-n, ``(-n))), n=-3..3);

 

 

P(z) := (1 + z^(-1))^2*(1 + z)^2*(r1*z + r0 + r1*z^(-1));
series(P(z), z);

 

 

Should be  arctan  instead of  arctg  .

f:=(x,y)->piecewise(x=0 and y=0,139 ,x=1 and y=0,144,x=2 and y=0,149,x=3 and y=0,155,x=4 and y=0,155,x=5 and y=0,155,x=6 and y=0,155,x=7 and y=0,155,x=0 and y=1,144,x=1 and y=1,151,x=2 and y=1,153,x=3 and y=1,156,x=4 and y=1,159,x=5 and y=1,159,x=6 and y=1,159,x=7 and y=1,159,x=0 and y=2,150,x=1 and y=2,155,x=2 and y=2,160,x=3 and y=2,163,x=4 and y=2,158,x=5 and y=2,156,x=6 and y=2,156,x=7 and y=2,156,x=0 and y=3,159,x=1 and y=3,161,x=2 and y=3,162,x=3 and y=3,160,x=4 and y=3,160,x=5 and y=3,159,x=6 and y=3,159,x=7 and y=3,159,x=0 and y=4,159,x=1 and y=4,160,x=2 and y=4,161,x=3 and y=4,162,x=4 and y=4,162,x=5 and y=4,155,x=6 and y=4,155,x=7 and y=4,155,x=0 and y=5,161,x=1 and y=5,161,x=2 and y=5,161,x=3 and y=5,161,x=4 and y=5,160,x=5 and y=5,157,x=6 and y=5,157,x=7 and y=5,157,x=0 and y=6,162,x=1 and y=6,162,x=2 and y=6,161,x=3 and y=6,163,x=4 and y=6,162,x=5 and y=6,157,x=6 and y=6,157,x=7 and y=6,157,x=0 and y=7,162,x=1 and y=7,162,x=2 and y=7,161,x=3 and y=7,161,x=4 and y=7,163,x=5 and y=7,158,x=6 and y=7,158,x=7 and y=7,158):

C:=t->piecewise(t=0, 1/sqrt(2), t>0 or t<0, 1):

F:=(u,v)->1/4*C(u)*C(v)*add(add(f(x,y)*cos((2*x+1)*u*Pi/16)*cos((2*y+1)*v*Pi/16), y=0..7), x=0..7):

F(0,0);

                                                                             1261

Your equation has too many parameters. If you set their values​​, the equation can be solved exactly sometimes, but more often numerically as follows:

restart;

p:=a*sin(omega[P]*t): q:=b*sin(omega[Q]*t+phi[Q]): r:=c*sin(omega[R]*t+phi[R]): s:=d*sin(omega[S]*t+phi[S]):

z:=p+q+r+s:

a,b,c,d,omega[P],omega[Q],omega[R],omega[S],phi[Q],phi[R],phi[S]:=1,2,3,4, Pi/6,Pi/3,Pi/4,2*Pi/3, Pi/2,Pi/4,Pi/4:  # values of parameters

fsolve(z, t); 

               -0.6371104099

f:=a->fsolve({0.5704+0.5211*exp(-0.6569*x)-0.03849*y=a, 0.561+0.5284*exp(-0.6479*x)-0.03929*y=a}):

f(1);

A:=plot(a->rhs(f(a)[1]),2..10, labels=[a, x(a)]):

B:=plot(a->rhs(f(a)[2]),2..10, labels=[a, y(a)]):

plots[display](Array([A, B]));

 

 

 

f:=(x,y)->piecewise(x=0 and y=0,139 ,x=1 and y=0,144,x=2 and y=0,149,x=3 and y=0,155,x=4 and y=0,155,x=5 and y=0,155,x=6 and y=0,155,x=7 and y=0,155,x=0 and y=1,144,x=1 and y=1,151,x=2 and y=1,153,x=3 and y=1,156,x=4 and y=1,159,x=5 and y=1,159,x=6 and y=1,159,x=7 and y=1,159,x=0 and y=2,150,x=1 and y=2,155,x=2 and y=2,160,x=3 and y=2,163,x=4 and y=2,158,x=5 and y=2,156,x=6 and y=2,156,x=7 and y=2,156,x=0 and y=3,159,x=1 and y=3,161,x=2 and y=3,162,x=3 and y=3,160,x=4 and y=3,160,x=5 and y=3,159,x=6 and y=3,159,x=7 and y=3,159,x=0 and y=4,159,x=1 and y=4,160,x=2 and y=4,161,x=3 and y=4,162,x=4 and y=4,162,x=5 and y=4,155,x=6 and y=4,155,x=7 and y=4,155,x=0 and y=5,161,x=1 and y=5,161,x=2 and y=5,161,x=3 and y=5,161,x=4 and y=5,160,x=5 and y=5,157,x=6 and y=5,157,x=7 and y=5,157,x=0 and y=6,162,x=1 and y=6,162,x=2 and y=6,161,x=3 and y=6,163,x=4 and y=6,162,x=5 and y=6,157,x=6 and y=6,157,x=7 and y=6,157,x=0 and y=7,162,x=1 and y=7,162,x=2 and y=7,161,x=3 and y=7,161,x=4 and y=7,163,x=5 and y=7,158,x=6 and y=7,158,x=7 and y=7,158);

add(f(0, y), y = 0 .. 7); 

 

 

Suggest significantly faster way to solve the original problem. Code is designed as a procedure. Formal argument - the search range. Solutions based on the idea of ​​a two-stage approach.

1) First, in the specified range, we find vectors of integer length.

2) Next, we will find already the desired triangles of these vectors.

Because we use the sets, then repeats excluded. Output contains coordinates of the vertices of the triangles and also the lengths of the all sides.

IntegerTriangle:=proc(R::range)

local L, x, y, z, d, P, Q, T, a, b, c, p;

L:={}:

for x from lhs(R) to rhs(R) do

for y from lhs(R) to rhs(R) do

for z from lhs(R) to rhs(R) do

d:=sqrt(x^2+y^2+z^2):

if type(d,posint) then L:={op(L), [x,y,z,d]} fi:

od: od: od:

T:={}:

for P in L do

if P[1]<=P[2] and P[2]<=P[3] then

for Q in (L minus {P}) do

a:=P[4]: b:=Q[4]: c:=sqrt((P[1]-Q[1])^2+(P[2]-Q[2])^2+(P[3]-Q[3])^2):

p:=(a+b+c)/2:

if type(2*p, integer) and type(sqrt(p*(p-a)*(p-b)*(p-c)), posint) then

T:={op(T), {sort([a,b,c]), {[0,0,0], P[1..3], Q[1..3]}}} fi:

od: fi; od:

T;

end proc:

 

Examples.

Triangles in the original range:

t:=time():

L:=IntegerTriangle(-4..4):

nops(L);

L[i] $ i=31..40;

time()-t;

 

Integer triangles in the 1st octant:

t:=time():

L:=IntegerTriangle(0..30):

nops(L);

time()-t;

                       364

                     1.750

First 251 252 253 254 255 256 257 Last Page 253 of 289