## 535 Reputation

8 years, 189 days

## @ecterrab Thank you Edgardo for thi...

Thank you Edgardo for this detailed answer.

I really feel that Physics is a world within Maple.
For instance, why are there so many updates and why are they not synchronized with the version changes of Maple?
Why is Physics such a special package?

@C_R

Maybe I didn't explain myself correctly but your example is not relevent.

• Physics, example
• Second section Mechanics
• First subsection Static: reactions of planes and tensions on cables
• "and the solution is eq 2.1.17
`{abs(R[A]) = cos(alpha)*abs(w)*sin(beta)/(2*sin(alpha)), abs(R[B]) = abs(w), abs(T[A]) = cos(alpha)*abs(w)*cos(beta)/(2*sin(alpha)), abs(T[B]) = cos(alpha)*abs(w)/(2*sin(alpha))}`
• Obviously abs(T[A]) is not necessarily positive (take beta=0 and alpha=3*Pi/4 for instance).
Then: what does abs(...) mean in the Physics package notation?

## @Carl Love Thanks Carl, sorry for t...

Thanks Carl, sorry for the inconvenience

## @permanoon123 Still a lot of errors...

@permanoon123

Still a lot of errors:

• As you perform an integration over x, C is a function of t alone.

• You missed many " * " symbols (a common error for people using 2D input mode).
For instance tou wrote `n &pi;x` instead n*Pi*x (copy paste your expression into a 1D input mode worksheet).

• It's quite simple to see (after having corrected the previous error) that the value of the integral is
`3250 * f(t) * exp(-lambda^2*t)`

(just put the terms containing t out of the integral and even out of the Sum])
Thus C, which is an infinite sum of this value is infinite too.

HINT: You probably wanted to write

`sin(n*Pi*x/L)*sin(m*Pi*x/L)`

? But even in this case

`sum(int(sin(n*Pi*x/L)*sin(m*Pi*x/L), x=0..L), m=1..+infinity) = 3250  # whatever the value of n`

I can't do anything more for you;
Correct your own equations and come back if you still have a problem.

## None of what you are looking for (PLS, P...

None of what you are looking for (PLS, PCR, KNN [see your previous question]) is avaliable in Maple.

Concerning KNN: if I'm not mistaken I think @Carl Love posted an implementation of it, let's say less than a year ago.
Try and search this within the "Posts".

Concerning PLS and PCR I will provide you two codes in a few hours (I need to extract them from a larger project I'm working on and make them work in an autonomous way... so it takes time).
See you soon.

## Does it makes sense to have negative wei...

Does it makes sense to have negative weights?

## If you want to copy together, what don&#...

If you want to copy together, what don't you generate a single image ?
Something like this

```ttt1 := textplot([0, 1, "3  +  5  =  __", color = "black", font = ["Arial", "bold", 120]]);
ttt2 := textplot([0, -1, "1  +  3  =  __", color = "black", font = ["Arial", "bold", 120]]);
display(ttt1, tt2, size = [1000, 400], axes = none);
```

## @sursumCorda I tried to avoid typos...

I tried to avoid typos but I missed this one, thanks.

With  optionsimplicit=[grid=[50, 50]] in inequal(...) the boundary is, IMO, smoother an more correct than the one you get with Mathematica.
As I have edited my answer you can see that the boundary is indeed very smooth (zoom on the figure to verify this).

Refining this grid gives an even smoother boundary but increases the computational time too.

Nevertheless, what I have done is only a workaround that we should not have to use if the visualization procedures were more efficient.
I'm  not even sure that my "trick" still works for other feasibility domains and/or mappings

## TIP...

Defining H this way

`H := `#mrow(mo("["),msup(mo("H"),mo("+")),mo("]"))``

will make the equality

` V__b=V__a*(( C__a/(1+H/K__a)-H+K__w/H)/(C__b/(1+K__w/H/K__b)+H-K__w/H))`

to appear exactly as in pour post.

H is an atomic variable you can manipulate in all the ways you want, for instance tomleslie's

## @nm  Thank you nm, I vote up....

@nm

Thank you nm, I vote up.

## Here is a simplified version of the prev...

Here is a simplified version of the previous answer I gave as mmcdara.
More of this I corrected an error due to the fact that the maximum values of the PDF are not equal to 1;

```restart:

Projector := proc(f, R, N, k)
local a := op(1, R):
local b := op(2, R):
local T, S:
uses Statistics:

if k > 0 and k < N then
T := RandomVariable(Triangular(a+(b-a)*(k-1)/N, a+(b-a)*(k+1)/N, a+(b-a)*k/N)):
return Mean(f(T)) * ((b-a)/N)
elif k=0 then
T := RandomVariable(Triangular(a, a+(b-a)/N, a)):
return Mean(f(T)) * ((b-a)/N/2)
elif  k=N then
T := RandomVariable(Triangular(b-(b-a)/N, b, b)):
return Mean(f(T)) * ((b-a)/N/2):
else
error cat("k must be an integer between 0 and ", N, " (given value ", k, ")")
end if:
end proc:

Array(0..6, k -> Projector(x -> sin(Pi*x), 0..1, 6, k))

```

## @tomleslie Thank you Tom for this d...

Thank you Tom for this detailed answer.

## @Thomas Richard  Using strict ineq...

@Thomas Richard

Using strict inequalities is indeed a good advice.

Converning your last remark "The help file (?convert,Heaviside) indicates that proper conversion is not always possible." :