vv

13805 Reputation

20 Badges

9 years, 308 days

MaplePrimes Activity


These are replies submitted by vv

@MathStudent0807 In the help page there is the surface integral of the function f(x,y,z) = y^2, over the sphere centered at <0,0,0> and having the radius r.

with(VectorCalculus):
SurfaceInt( y^2, [x,y,z] = Sphere( <0,0,0>, r ) );

Are you trying to say that your integral is much different?

Open the help page; type
?SurfaceInt

Note that you can open the help page as a worksheet, by clicking the 'WS' icon.
You will find there a very similar example; just edit it.

@tomleslie My remark is about the exact solution which is awful. It containe RootOfs for polynomials with degrees >30.

@acer You could also mention that for
expr := sin(x) - cos(32*x - 1/6*Pi);
solve(expr, allsolutions);

==> huge answer (length >1000000)
instead of a simple and easy to obtain:
{-1/93*Pi - 2/31*_Z1*Pi, 2/99*Pi - 2/33*_Z2*Pi}


 

For 
eq  := 2*exp(-exp(2*t)) + 4*t = 127

it will be (almost) impossible using fsolve to decide whether the solution is rational or not.

@rupsagar I don't see your desired result. Without it, it would be a waste of time to continue.

@rupsagar You forgot an example and the desired result.

@rupsagar Provide solution to what? If you use z(x) as above, the chain rule is automatic as shown.
If you want something else, provide a concrete example (include the desired result).

@mmcdara Yes, and all three of us know them. Anyway, the probability that someone knows the ode of the catenary but not its formula is low.

@mmcdara The "simpler" adjective is very relative:

restart;
Y := x -> (cosh(a*x)-1)/a:
L := x -> sinh(a*x)/a:
solve([L(x1)+L(x2)=140, Y(x1)=50, Y(x2)=70, a>0,x1>0,x2>0], explicit):
evalf(%);
#         {a = 0.09213375345, x1 = 26.14739561, x2 = 29.26983504}

 

The mathematical name for "ambivert" is (real) analytic involution.

restart;

n:=10:

f:=add(a[k]*x^k, k=1..n):

S:=seq(coeff(eval(f, x=f)-x, x, k), k=1..n):

solve([S, a[1]=1]);  # only the identity if f is increasing

{a[1] = 1, a[2] = 0, a[3] = 0, a[4] = 0, a[5] = 0, a[6] = 0, a[7] = 0, a[8] = 0, a[9] = 0, a[10] = 0}

(1)

solve([S, a[1]=-1]);

{a[1] = -1, a[2] = a[2], a[3] = -a[2]^2, a[4] = a[4], a[5] = 2*a[2]^4-3*a[2]*a[4], a[6] = a[6], a[7] = -13*a[2]^6+18*a[2]^3*a[4]-4*a[2]*a[6]-2*a[4]^2, a[8] = a[8], a[9] = 145*a[2]^8-221*a[2]^5*a[4]+35*a[2]^3*a[6]+50*a[2]^2*a[4]^2-5*a[2]*a[8]-5*a[4]*a[6], a[10] = a[10]}

(2)

 

To obtain an involution from the Lambert function we actually have to be careful about branches!

F:=piecewise(x<0, 1 + LambertW(0,  (x - 1)*exp(x - 1)),
                  1 + LambertW(-1, (x - 1)*exp(x - 1)))

F := piecewise(x < 0, 1+LambertW((x-1)*exp(x-1)), 1+LambertW(-1, (x-1)*exp(x-1)))

(3)

plot(F, x=-10..1);  # F is involution in (-infinity, 1)

 

id:=eval(F, x=F); # identity

id := piecewise(piecewise(x < 0, 1+LambertW((x-1)*exp(x-1)), 1+LambertW(-1, (x-1)*exp(x-1))) < 0, 1+LambertW((piecewise(x < 0, 1+LambertW((x-1)*exp(x-1)), 1+LambertW(-1, (x-1)*exp(x-1)))-1)*exp(piecewise(x < 0, 1+LambertW((x-1)*exp(x-1)), 1+LambertW(-1, (x-1)*exp(x-1)))-1)), 1+LambertW(-1, (piecewise(x < 0, 1+LambertW((x-1)*exp(x-1)), 1+LambertW(-1, (x-1)*exp(x-1)))-1)*exp(piecewise(x < 0, 1+LambertW((x-1)*exp(x-1)), 1+LambertW(-1, (x-1)*exp(x-1)))-1)))

(4)

plot(id, x=-10..1);

 

simplify(eval(id, x=a)) assuming a<1; # Maple cannot simplify to a

1+piecewise(piecewise(a < 0, LambertW((a-1)*exp(a-1)), 0 <= a, LambertW(-1, (a-1)*exp(a-1))) < -1, LambertW((a-1)*exp(a-1)), LambertW(-1, (a-1)*exp(a-1)))

(5)

eval(id, x=-3);  evalf(%);   #numerical check
eval(id, x=1/3); evalf(%);

1+LambertW(-1, LambertW(-4*exp(-4))*exp(LambertW(-4*exp(-4))))

 

-3.000000000

 

1+LambertW(LambertW(-1, -(2/3)*exp(-2/3))*exp(LambertW(-1, -(2/3)*exp(-2/3))))

 

.3333333331

(6)

 

Download involution-vv.mw

@jeffreyrdavis75 You should state clearly what you want to be proved, in correct Maple syntax (or at least a correct mathematical  formula).

@eager0626 
I have used a combination of Groebner[Basis], solve and fsolve(for polynomials).
I did it only because I wanted to know the exact situation, the results of fsolve and DirectSearch being confusing.
Knowing now that except for (a=0,b=0,u=anything)   there are exactly two solutions  (a0, b0, u0)  and  (-a0, b0, Pi+u0),  we may use fsolve which is very fast!

fsolve(eval(sys,sigma=0.5), {a=0.0001 .. 1, b=0.0001 .. 1,  Upsilon=-Pi..Pi});

       {Upsilon = 0.01767204623, a = 0.01542763525, b = 0.002577584538}

The solution set is infinite (even uncountable), e.g. a=0, b=0, Upsilon=arbitrary;  (actually Upsilon should be modulo 2*Pi). So, finding all of them numerically is out of the question.

If you really need all the solutions, you could convert the system into a polynomial one (e.g. using cos(Upsilon)=c, sin(Upsilon)=d, c^2+d^2=1) and call solve or (better) Groebner:-Basis.

In Windows, the directory "Program Files", its subdirectories and files are write-protected.
You can use Windows commands to remove the protection, but it would be a bad idea.
Why do you want to create the library there? The only benefit would be that the path is automatically included in libname, but if you really need that, you could use a maple.ini file (see the help), or you may put your library in a directory

cat(kernelopts(homedir),"/maple/toolbox/YourDir/lib")

First 25 26 27 28 29 30 31 Last Page 27 of 176