## 20139 Reputation

15 years, 287 days

## Solution...

Consider 2 points   A(0,0)  and  B(1,0) . The line  BC  has the equation  y=tan(100*Pi/180)*(x-1) . We assume that the points  С  and  D   lie above the axis  Ox , and the length of the  BC  is equal to 1. Then we get  C(1+cos(100*Pi/180), sin(100*Pi/180)) . The slope of the straight line  CD  will be equal to  tan(100*Pi/180+70*Pi/180) .

 > restart; local D: A:=[0,0]: B:=[1,0]: C:=[1+cos(100*Pi/180),sin(100*Pi/180)]: D:=eval([x,y],solve({y=tan(120*Pi/180)*x, y=C[2]+tan(100*Pi/180+70*Pi/180)*(x-C[1])})); P:=plottools:-curve([A,B,C,D,A], color=red, thickness=2): T:=plots:-textplot([[A[],"A"],[B[],"B"],[C[],"C"],[D[],"D"]], font=[times,20], align=[left,below]): plots:-display(P,T, scaling=constrained, axes=none);
 >

 >
 >
 >
 (1)
 >
 (2)
 >
 (3)
 >

## More...

There are other ways to solve the problem. For example, you can use the  seq  command, or just loop through the set  , applying the appropriate condition:

```restart;
A := {3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101};

{seq(`if`(modp(a,3)=1,a,NULL), a=A)}; # The second way

k:=1:  # The third way
for a in A do
if modp(a,3)=1 then k:=k+1; B[k]:=a fi;
od:
convert(B, set);
```

## D operator, unapply command , continuou...

 > restart;
 > f := x->a*x/(4*x^2+b); g:=D(f);
 (1)
 > h:=unapply(int(f(t),  t=0..x, continuous), x); h(x);
 (2)
 >

 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 >

## eval...

The  simplify  command is redundant here and can be dispensed with using the  eval command:

```restart;
diff(f(x,y),x)+diff(f(x,y),y);
eval(%, f(x,y)=f(x,y0));
```

## convert(... , exp)...

In older versions of Maple, the  simplify  command does not help (I'm using Maple 2018). The  convert  command does the job:

```Expr:=sin(theta)^(A - 2)*cos(theta)^2 - sin(theta)^(A - 2) + sin(theta)^A:
convert(Expr, exp);
```

0

## In one go in Maple 2018...

```restart;
eqn := y(x)*(2*x*(diff(y(x), x))+y(x)*((diff(y(x), x))^2-1)) = -1:
dsolve(eqn);```

## Solution...

You can easily solve this system numerically if you give numerical values for the parameters alpha, a[1], a[2], a[3] .

The example:

 > restart; eq1 := diff(f(x), x, x, x)+(1/2)*cos(alpha)*x*(diff(f(x), x, x))+(1/2)*sin(alpha)*f(x)*(diff(f(x), x, x)) = 0: eq2 := diff(g(x), x, x)+diff(g(x), x)+(diff(g(x), x))*(diff(h(x), x))+cos(alpha)*x*(diff(g(x), x))+sin(alpha)*f(x)*g(x) = 0: eq3 := diff(g(x), x, x)+diff(h(x), x, x)+1/2*(cos(alpha)*x+sin(alpha)*f(x)) = 0: ics := f(0) = 0, (D(f))(0) = 1, ((D@@2)(f))(0) = a[1], g(0) = 1, (D(g))(0) = a[2], h(0) = 1, (D(h))(0) = a[3]: alpha:=Pi/4: a:=[1,2,3]: dsolve({eq1,eq2,eq3,ics}, numeric); plots:-odeplot(%, [[x,f(x)],[x,g(x)],[x,h(x)]], x=0..3, color=[red,blue,green]);
 >

## A way...

Suppose you want to write the following expression  Expr  in powers of  x-1 . You can do it like this:

 > restart; Expr:=x^2-3*x+5: eval(Expr, x=y+1); subs(y=``(x-1),expand(%)); # Desired form expand(%); # Check
 (1)
 >

## Solution...

Since the curve  f(x)  is symmetrical about the Oy axis, the circle must also be symmetrical about the Oy axis and touch the lower branch in the point  (0,-1) . So the upper semicircle will be  y=sqrt(R^2-x^2)+R-1 . In general, we have 5 points of intersection. If we impose the condition  R^2-2*R = 0 , then we have 3 points of intersection:

 > restart; solve(sqrt(R^2-x^2)+R-1=(x^2+1)/(x^2-1), x); R:=solve(R^2-2*R=0)[2]; plots:-display(plot((x^2+1)/(x^2-1), x=-4..4, -4..4, color=blue), plots:-implicitplot(x^2+(y-(R-1))^2=R^2, x=-4..4, y=-4..4, color=red));
 >

 >
 (1)
 >
 (2)
 >
 >
 (3)
 >

## A way...

```restart;
i := [seq(2*i-1, i = 1 .. 10)];
A[m]:=[seq((x/a)^(i+1)*(1-x/a)^2, i in i)];
```

## A way...

I think OP meant the intersection not of the surfaces of these tori, but of the solids themselves. Here is a way:

```restart;
with(plots):
ce := (p, q, r, a, b) ->  ((x-p)^2 + (y-q)^2 + (z-r)^2 + a^2 - b^2)^2 - 4*a^2*((x-p)^2 + (y-q)^2):
T1 := ce(1, 1, 1, 2, 1):
T2 := ce(1, 6, 1, 2, 1):
implicitplot3d(max(T1,T2), x=-1..3, y=0..4.5, z=-1..2, style=surface, color="Red", grid=[50, 50, 50], scaling=constrained, axes=normal, orientation=[15,80]);
```

## RandomTools:-Generate(choose({ ... }));...

Example:

`RandomTools:-Generate(choose({x->x^2,x->x^3,x->x^4}));`

 3 4 5 6 7 8 9 Last Page 5 of 280
﻿