## 20269 Reputation

15 years, 348 days

## Re...

@acer  1. I did not set a goal to calculate this integral of a complex-valued function over the entire interval,, but simply wanted to explain to OP why Maple does not directly calculate this integral. I also wanted to show that for this calculation it is not necessary to call the VectorCalculus package, but we can simply use the int  command (or evalf(Int) for numerical calculation).

2. As for the integrand, I confused path integral with line integral (omitting the arc differential), as already pointed out by Carl.

## Corrected version...

@acer Thanks for the helpful critique. Below is the corrected version with your example:

```restart:
CartProd:=proc(L)
local n, l, p;
option remember;
n:=nargs;
if n=1 then return args else
if n=2 then return [seq(seq([p,l], l=args[2]), p=args[1])] else
[seq(seq([op(p),l], l=args[n]), p=thisproc(args[1..n-1]))] fi; fi;
end proc:

LL:=seq([seq(x[i,j],j=1..3)],i=1..2):
CartProd(LL);
```

## OK...

@mmcdara  Yes, sure. It's very easy to fix.

## Solution...

@Angie7

```restart;
x:=t->2*a+b*t^3+2*t^2;
solve({x(0)=1, D(x)(1)=1});
```

## OK...

@rquirt  Yes, sure.

## Re...

@rquirt   Yes, you must do it yourself. Don't expect Maple to always do everything for you.

```convert(6*inches, metric)/100;
step:=evalf[4](op(1,%));
seq(f(x)*Unit('m'), x=1.0..10.0, step);
```

## 2592 ones...

@brian bovril  In total there will be 2592 examples under such conditions. Below are some examples of these:

```restart:
TA := [A, B, C]:
TB := [X, Y, Z]:
n:=nops(TA):
L:=convert(Matrix(n, (i,j)->[TA[i],TB[j]]), list):
P:=combinat:-permute(L):
k:=0:
for p in P do
if `and`(seq(nops({p[i][],p[i+1][],p[i+2][]})=6, i=1..nops(L)-2, 3)) then k:=k+1; M[k]:=p fi;
od:
M:=convert(M, list):
k;
for i from 1 to k by 300 do
print(M[i]);
od:  ```

## No...

@brian bovril  But in your example this condition is not met:

[[A,X], [B,Y],[C,Z],[B,X], [A,Z], [C,Y],[B,Z],[C,X], [A,Y]]

This is basically impossible, as a slight modification of the code from my answer above shows:

```restart:
TA := [A, B, C]:
TB := [X, Y, Z]:
n:=nops(TA):
L:=convert(Matrix(n, (i,j)->[TA[i],TB[j]]), list):
P:=combinat:-permute(L):
k:=0:
for p in P do
if `and`(seq(nops({p[i][],p[i+1][],p[i+2][]})=6, i=1..nops(L)-2)) then k:=k+1;
print(p) fi;
od:
k;  ```

0

## Solution...

@bstuan  Maple is not needed for the solution. We make the change  x=t+3/2  and use the fact that the integral of an odd function over a symmetric (with respect to the origin) interval is equal to 0:

int(x*f(x), x=1..2) = int((t+3/2)*f(t+3/2), t=-1/2..1/2) = int(t*f(t+3/2),  t=-1/2..1/2) + 3/2*int(f(t+3/2), t=-1/2..1/2) = 0 + (3/2)*4 = 6

The function g(t) = t*f(t+3/2)  is odd.

## Plotting a triangle by the lengths of 3...

@ommy03  See my procedure at the link above for plotting a triangle given the lengths of three sides.

## No solution either...

@bstuan The problem with the changed point  M  also has no solutions, because the distance from M to the line is less than 3:

```restart;
with(geom3d):
point(P1,[1,0,3]): point(P2,[1,0,3]+[-1,1,2]):
line(l,[P1,P2]):
point(M,[1,0,2]):
distance(M,l);
evalf(%);
```

0 .5773502693

@logan35  I have already answered you what needs to be corrected in your 2 "for" loops program. Your program is a little strange. Because  N[i,j]  depends only on  i , it turns out that all students in each individual exam receive the same marks.

## Re...

@logan35  You don't seem to understand the meaning of my answer. The procedure named  Mean  is the shortest way to find the average of any sequence of numbers. This is the program that answers the question posed in the title of your question. Your program with 2 nested loops finds the average for a particular sequence of numbers. It will work correctly if you replace the line  numb:=numb+i  with the line  numb:=numb+1 .  But with the procedure  Mean , the same is  solved much easier and shorter:

```Mean:=proc() `+`(args)/nargs; end proc:
S:=seq(seq(20*i, i=1..3), j=1..5);
Mean(S);
```

S := 20, 40, 60, 20, 40, 60, 20, 40, 60, 20, 40, 60, 20, 40, 60
40

## Re...

@Mariusz Iwaniuk  I think you understand perfectly well that from the standpoint of rigorous mathematics, no finite number of terms (even 1,000,000 ones) is a proof.

## No...

@lcz  I don't know this proof.

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