Kitonum

21830 Reputation

26 Badges

17 years, 219 days

MaplePrimes Activity


These are answers submitted by Kitonum

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_...

restart; 
f := (x,y)->x+y ; 
f2 :=  (x,y)->x^2+y^3 ; 
f3 := f+f2; 
f3(x,y); 
f3(5,10);

 

Replace the last line with

plots:-odeplot(sol, [[t, B(t)], [t, L(t)], [t, S(t)]], t = 0 .. .3, color = [red, blue, green], legend = [B(t), L(t), S(t)], labels = [t, ``]);

 

First 89 90 91 92 93 94 95 Last Page 91 of 292