Kitonum

21500 Reputation

26 Badges

17 years, 60 days

MaplePrimes Activity


These are answers submitted by Kitonum

restart; 
simplify(A*sin(x)^2+A*cos(x)^2);

 

A simple procedure  Cone  returns parametric equations and plots a conical surface defined its vertix  S  and 3 points  A, B, С of the base lying on a plane  xOy . If  S  is a number then the procedure treats it as the height of a right circular cone. If   is a list, then it is the coordinates of the vertex of the cone.

 

restart;
Cone:=proc(A,B,C,S)
local a, b, c, cc, oo, R, CC, Eq;
uses geometry;
point(a,A); point(b,B); point(c,C);
circle(cc, [a, b, c], [x,y], 'centername'=oo);
R:=radius(cc); CC:=coordinates(oo);
if type(S,list) then
Eq:=[(CC[1]+R*cos(phi))*t+S[1]*(1-t),(CC[2]+R*sin(phi))*t+S[2]*(1-t),S[3]*(1-t)] else
Eq:=[(CC[1]+R*cos(phi))*t+CC[1]*(1-t),(CC[2]+R*sin(phi))*t+CC[2]*(1-t),S*(1-t)] fi;
print(simplify(Eq));
plot3d(Eq, phi=0..2*Pi, t=0..1, axes=normal, scaling=constrained);
end proc:

Cone([1,1],[3,4],[5,1],5);

[(13/6)*t*cos(phi)+3, (13/6)*t*sin(phi)+11/6, 5-5*t]

 

 

Cone([1,1],[3,4],[5,1],[6,3,5]);

[(13/6)*t*cos(phi)-3*t+6, (13/6)*t*sin(phi)-(7/6)*t+3, 5-5*t]

 

 

 


 

Download Cone.mw

Edit.

Changes in your graphs when changing the parameter   is convenient to observe with the help of animation. I took a range for the animation parameter  E = 0 .. 2  with the step  0.02 . See attached file.

captive_breeding_new.mw

 

The  isolve  command fails with this equation.

Rewrite the equation as  2^y - x^2 = 615 . It is easy to check by the last digit that  y  should be even that is  y=2*n . So we have  (2^n - x)*(2^n + x) = 615 . The number 615 can be factored into 2 integer factors in 3 ways for  x>0:  615 = 3*205 = 5*123 = 15*41 

Solving the corresponding 3 systems, we obtain the unique solution:

restart;
ifactor(615);
solve({2^n-x=5,2^n+x=123});
solve({2^n-x=3,2^n+x=205});
solve({2^n-x=15,2^n+x=41});

              

 

 

Use the double  seq  command for this. First, I used a set structure to remove duplicate elements and for automatic sorting, then converted it into a list:

convert({seq(seq(a^2+b^2, a=0..5), b=0..5)}, list);
select(type, %, odd);

 

Use the  rsolve  command with the  makeproc  option:

restart;
u:=rsolve({u(n + 1) = 3.5*u(n)*(1 - u(n)), u(0) = 0.4}, u(n), makeproc);
seq([k,u(k)], k=0..100);
plot([%], style=point);

 

A:=<a,b; c,d>;
B:=<e, f>;
<A | B>; 

 

I have not found another solution to the problem than using  InertForm  package:

restart;
with(InertForm):
plots:-textplot([1,1,Typeset(Parse("Pi/6"))]);

 

csgn(x^2) assuming real;

  Output:  1                       

f:=x->3*x^2+1:
Matrix([seq([x,f(x)], x=1..3.5,0.5)]);

 

Another way is to turn  x(t)  into a name using oblique quotes:

restart;
f:= 2*`x(t)`+5;
diff(f, `x(t)`);

You can simplify the equation  eq  significantly if you run

simplify(eq) assuming h>0;

        

@ms0439883 
Here is a simple recursive procedure that solves your problem for any  n  and  k . It does not use any packages, only commands from the Maple core.


 

restart;
P:=proc(n, k)
option remember;
if k=1 then return [[n]] else if k=n then return [[1$n]] else
[seq(map(t->[t[],i], select(r->r[-1]<=i,P(n-i,k-1)))[], i=n-k+1..ceil(n/k), -1)] fi; fi;
end proc:

# Examples of use
P(10,2);
P(10,4);
P(20,4);

[[1, 9], [2, 8], [3, 7], [4, 6], [5, 5]]

 

[[1, 1, 1, 7], [1, 1, 2, 6], [1, 1, 3, 5], [1, 2, 2, 5], [1, 1, 4, 4], [1, 2, 3, 4], [2, 2, 2, 4], [1, 3, 3, 3], [2, 2, 3, 3]]

 

[[1, 1, 1, 17], [1, 1, 2, 16], [1, 1, 3, 15], [1, 2, 2, 15], [1, 1, 4, 14], [1, 2, 3, 14], [2, 2, 2, 14], [1, 1, 5, 13], [1, 2, 4, 13], [1, 3, 3, 13], [2, 2, 3, 13], [1, 1, 6, 12], [1, 2, 5, 12], [1, 3, 4, 12], [2, 2, 4, 12], [2, 3, 3, 12], [1, 1, 7, 11], [1, 2, 6, 11], [1, 3, 5, 11], [2, 2, 5, 11], [1, 4, 4, 11], [2, 3, 4, 11], [3, 3, 3, 11], [1, 1, 8, 10], [1, 2, 7, 10], [1, 3, 6, 10], [2, 2, 6, 10], [1, 4, 5, 10], [2, 3, 5, 10], [2, 4, 4, 10], [3, 3, 4, 10], [1, 1, 9, 9], [1, 2, 8, 9], [1, 3, 7, 9], [2, 2, 7, 9], [1, 4, 6, 9], [2, 3, 6, 9], [1, 5, 5, 9], [2, 4, 5, 9], [3, 3, 5, 9], [3, 4, 4, 9], [1, 3, 8, 8], [2, 2, 8, 8], [1, 4, 7, 8], [2, 3, 7, 8], [1, 5, 6, 8], [2, 4, 6, 8], [3, 3, 6, 8], [2, 5, 5, 8], [3, 4, 5, 8], [4, 4, 4, 8], [1, 5, 7, 7], [2, 4, 7, 7], [3, 3, 7, 7], [1, 6, 6, 7], [2, 5, 6, 7], [3, 4, 6, 7], [3, 5, 5, 7], [4, 4, 5, 7], [2, 6, 6, 6], [3, 5, 6, 6], [4, 4, 6, 6], [4, 5, 5, 6], [5, 5, 5, 5]]

(1)

 


 

Download proc.mw

Look at this post  https://www.mapleprimes.com/posts/200677-Partition-Of-An-Integer-With-Restrictions , which presents the  Partition  procedure. The procedure solves a variety of problems associated with partition of an integer, in particular partition with different restrictions.

After the loading  screen appears, open the task manager, then the details, then 2 times destroy the process whose name begins with  jogamp_...

First 87 88 89 90 91 92 93 Last Page 89 of 290