## 827 Reputation

11 years, 202 days

## DirectSearch:-SolveEquations...

Maybe I miss understand what you are after.

 >
 >
 (1)
 >
 >
 (2)
 >
 >
 >
 >
 >
 (3)
 >
 (4)
 > SolveEquations(eval(W,{x=-0.0000039}))
 (5)
 >
 (6)
 >
 (7)
 >
 (8)
 >
 (9)
 >
 (10)
 >

## solve...

Use solve

T has 4 different value.

solve(T[1], Q); gives  -q*sigma^3/3

You get the same answer for T_2, T_3, T_4

## Possibly check save large calculations...

Might be worth checking this setting.

## Shift + F5...

Shif +F5 stops executable math from running the blue box turns grey. You can use it inside test too. Also RMB to untick executible maths works. When in a line of test and you want to enter an equation click on math button enter equation then RMB untick executible math then click on text button again.

 (1)

Test section   now more text
Shift Return for this line.

## Here are a couple...

https://www.mapleprimes.com/questions/201298-How-To-Animate-A-Bouncing-Ball-On-A-3d-Surface

or another

https://www.mapleprimes.com/questions/224449-How-To-Model-A-Bouncing-Ball-Through

Just Search for Ball.

## Windows 10 File History...

If you are using Windows 10 turn File History. That keeps a running backup of all files you work on. You coud set to save  once a hour. It has gotten me out of trouble a few times.

## Evaluate - Remove output...

They moved it to Evaluate Remove Output. Ctrl+Shift+R

This works.

 (1)

 (2)

 (3)

 (4)

## Using affine geometry...

Hi,

This really is just a more expanded version of  answer.

 (1)

 (2)

 (3)

H lies on the line connecting AB, H can be defined as an affine combination of A and B. -∞ < λ < ∞. If 0 < λ < 1 then λ lies between A and B

 (4)

Get distance between P and H

 (5)

Miniminist the distance by differentiating wrt λ. Then solve for λ

 (6)

 (7)

Back substitute. This is the shortest possible distance  between P and H

 (8)

The coordinates to H

 (9)

## Union...

Try this, I extended your list,

L1 := [{3, 5}, {4, 5}, {4, 8, 9}, {-7, 2, 3}]:

L2 := {};  #empty set
L2 := {}
for i to nops(L1) do
L2 := L1[i] union L2
end do;
L2 := {3, 5}
L2 := {3, 4, 5}
L2 := {3, 4, 5, 8, 9}
L2 := {-7, 2, 3, 4, 5, 8, 9}

## gridrefine...

Try   implicitplot(cos(x)*cosh(y) = 1, x = -3 .. 3, y = -5 .. 5, gridrefine=2).

You can set higher values for gridrefine   3,4,5

http://www.yorku.ca/marko/ComPhys/Euler/Euler.html

you would need to do your own animation though.

Also here in a question, I posted at the time @Rouben Rostamian    gave a quaternion solution.

This is an animation I did from following the blog I mentioned in the previous reply. It shows the momentum vectors.

## Error appears to be at c:=...

I changed your c:= to an "if then else end if".That stops producing the Error  But I could have intrepited your statement  incorrectly.

 > restart;

 > fdsolve := proc({gamma:=NULL, rho:=NULL, mu:=NULL, omega:=NULL, t0:=NULL,                  t1:=NULL, x0:=NULL, y0:=NULL,                  N:=NULL}, params)     local t, h, c, b, x, y, L, n, l, X, Y, f, g, s1, s2, s3, s4, s5, s6, s7, s8, s9;     eval(F(t,x,y), params);     f := unapply(%, [t,x,y]);     eval(G(t,x,y), params);     g := unapply(%, [t,x,y]);     L := floor(1/mu);     h := (t1 - t0)/N; s1:= sum(((omega*(h*(n-1))^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+2)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s2:= sum(((omega*(h*n)^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+2)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s3:= sum(((omega*(h*n)^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+1)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s4:= sum(((omega*(h*(n-i+1))^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+2)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s5:= sum(((omega*(h*(n-i-1))^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+2)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s6:= sum(((omega*(h*(n-i))^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+2)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s7:= sum(((omega*(h*(n-i))^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+1)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s8:= sum(((omega*(h*(n-i-1))^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+1)*factorial(j)*GAMMA(gamma)), j = 0 .. 100); s9:=sum(((omega*h^rho)^(j)*GAMMA(gamma+j))/(GAMMA(j*rho+mu+2)*factorial(j)*GAMMA(gamma)), j = 0 .. 100);         c := (i,n) ->         if i=0 then               (h^mu)*(  ( ((n-1)^(mu+1))*s1 )-((n^(mu+1))*s2)+((n^(mu))*s3)  )else               (h^mu)*( (((n-i+1)^(mu+1))*s4)+(((n-i-1)^(mu+1))*s5)-(2*((n-i)^(mu+1))*s6) )         end if; b := (i,n) -> (h^mu)*( ((n-i)^(mu)*s7)-((n-i-1)^(mu)*s8) );     t := Array(0..N, i-> (1-i/N)*t0 + i/N*t1, datatype=float[8]);     x[0], y[0] := x0, y0;                                                for n from 0 to N-1 do         X[0], Y[0] :=             x[0] + add(b(i,n+1)*f(t[i],x[i],y[i]), i=0..n),             y[0] + add(b(i,n+1)*g(t[i],x[i],y[i]), i=0..n);         for l from 1 to L do             X[l], Y[l] :=                 x[0] + add(c(i,n+1)*f(t[i],x[i],y[i]), i=0..n)                      + (h^mu)*s9*f(t[n+1], X[l-1], Y[l-1]),                 y[0] + add(c(i,n+1)*g(t[i],x[i],y[i]), i=0..n)                      + (h^mu)*s9*g(t[n+1], X[l-1], Y[l-1]);         end do;         x[n+1], y[n+1] := X[L], Y[L];         #printf("y[%d]=%a\n", n+1, y[n+1]);     end do;     return Array(0..N, i -> [t[i], x[i], y[i]]); end proc
 (1)
 >
 >

## Another Suggestion too...

If you want to some home study by yourself this is very good. Called Maths Foundation series.