## 14284 Reputation

11 years, 228 days

## The sum of functons...

@mmcdara  You wrote: "The main point is in the definition of f3 which should had been f3 := (x, y) -> f(x, y)+f2(x, y)".

But  f3:=f+f2  and  f3 := (x, y) -> f(x, y)+f2(x, y)   are the same, regardless of whether the variables  x  and  y  are predetermined or not.

For example:

f := sin + cos:
f(Pi/6);

## eval...

@MuhammadSinan  Using the  eval  command you can get a list of values of any of the functions with the necessary step. For example:

`[seq(eval([t, B(t)], sol(s)), s = 0 .. 1, 0.01)];`

## Amendment...

@Carl Love  Since the new 3 teams differ in color, it is not necessary to divide by 3 in the denominator.

## sync and different...

@acer  If the graphs should be at different plots, it can be made easier:

```A:=plots:-animate(plot,[x^2, x=-2..a, color=red], a=-2..2, frames=60):
B:=plots:-animate(plot,[sin(2*x), x=0..a, color=blue], a=0..2*Pi, frames=60):
plots:-display(<A | B>, size=[700,400]);
```

## How to model the shape of container...

Here's a possible formulation of the problem: find the dimensions of a cylindrical container that has the smallest full surface that could hold all your chocolates. For comparison, the same for the container in the form of a cuboid.

## Answer for arbitrary parameter  b...

@Zeineb  My answer is incomplete and only applies to case b = 0 (I just did not notice this number b). k=0 will also be the solution for this case. But in the general case, for an arbitrary b, the answer will be much more complicated and will depend on  . I'm working on it now and soon my answer above will be updated.

## Dimension of the solution space vs the n...

@tizozadoxo  This linear system has the unique solution  (0, 0, 0) . But maybe you are confusing the dimension of the solution space with the number of solutions. From a geometric point of view, every solution of the system is a point in the space  R^3 . But a point has dimension  .

## Explanation...

@Carl Love  I understood the dots above the variables in the first equation of the system as derivatives.

## Re...

@Lali_miani   Because  u(1)=sin(u(0)), u(2)=sin(u(1))=sin(sin(u(0)))  and so on.

## Re...

@Lali_miani  For example  (sin@@3)(x)  means  sin(sin(sin(x))) :

`expand((sin@@3)(x));`

sin(sin(sin(x)))

## ?...

@Lali_miani   But  sin(1.5) = 0.9974949866  not  0.84

@vanzzy  I changed the colors a bit to make them all different. Some graphics in separate ranges merge. For example, red with yellow and black with blue.

 > restart; with(plots):
 > gm := V -> 1/sqrt(1-V^2): T := w-k*V: S := w*V-k:
 > f := unapply(-135/4*w^5+369/16*w^3*k^2+47/4*I*w^4-93/16*I*w^2*k^2+w^3-2/3*w^3*k*B-27/16*k^4*w+3/16*I*k^4-1/3*w*k^2+2/9*k^3*w*B,w,B,k):
 >
 (1)
 > altcols := ["Black","Red","Blue"]:
 > Vlist :=  [ 0.8, 0.9, 0.99 ];
 (2)
 > _EnvExplicit := true;
 (3)
 > H:=[allvalues(solve(Hgen,w))]; nops(H);
 (4)
 > plt1 := plot(Im(eval(H[1], B = 1)), k = 0 .. 1, color = red, linestyle = solid, discont = true): plt2 := plot(Im(eval(H[2], B = 1)), k = 0 .. 1, color = black, linestyle = solid, discont = true): plt3 := plot(Im(eval(H[3], B = 1)), k = 0 .. 1, color = green, linestyle = solid, discont = true): plt4 := plot(Im(eval(H[4], B = 1)), k = 0 .. 1, color = blue, linestyle = solid, discont = true): plt5 := plot(Im(eval(H[5], B = 1)), k = 0 .. 1, color = yellow, linestyle = solid, discont = true): display(plt1, plt2, plt3, plt4, plt5);
 >

## Procedure using evala command...

@Chouette  It seems that a simple procedure called  Intersect  solves your problem. The procedure uses  evala  command, which apparently reliably recognizes the coincidence of algebraic numbers. Numbers can be given both explicitly (in radicals) and implicitly (as  RootOf  placeholder). So in the last example below it is shown that each root of the first equation is also the root of the second equation. The procedure works as follows: first, remove the duplicate elements (if any) from the first set, and then compare each element of the first set with each element of the second set, and so we get their intersection.

```restart;
Intersect:=proc(S1::set,S2::set)
local T, m:=nops(S1), n:=nops(S2), SS1, m1;
T:={seq(seq(`if`(evala(S1[i]-S1[j])=0,S1[i],NULL), j=i+1..m), i=1..m-1)};
SS1:=S1 minus T;
m1:=nops(SS1);
{seq(seq(`if`(evala(SS1[i]-S2[j])=0,SS1[i],NULL), j=i..n), i=1..m1)};
end proc:
```

Examples of use:

Intersect({sqrt(6)},{sqrt(2)*sqrt(3)});

Sol1 := {solve( R^2-sqrt(2)*R-1 )};
Sol2 := {solve( (sqrt(3)+1)*R^2 = sqrt(3)-1 )};
Intersect(Sol1,Sol2);

Intersect({sqrt(7)+1}, {6/sqrt(8-2*sqrt(7))});

S1:={solve(x^17+2*x^11+4*x^5-1=0)}:
S2:={solve(x^23-x^6-8*x^5+2=0)}:
Intersect(S1,S2);

## simplify, rationalize...

@Chouette  Use  rationalize(simplify(...))  for algebraic numbers:

```Sol1 := {solve( R^2-sqrt(2)*R-1 )};
Sol2 := {solve( (sqrt(3)+1)*R^2 = sqrt(3)-1 )};
rationalize(simplify(Sol1));
rationalize(simplify(Sol2));
```

 First 8 9 10 11 12 13 14 Last Page 10 of 107
﻿