Carl Love

Carl Love

28035 Reputation

25 Badges

12 years, 321 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@janhardo Okay, I now understand your confusion regarding gradients.

Almost everything in calculus can be interpreted in a geometric/graphical way and an algebraic/symbolic way. The geometric way helps with "seeing the big picture"; the algebraic way is easier to compute with. Your understanding of gradients is geometric: The gradient is the vector that points in the direction of locally maximal steepest ascent, and it's perpendicular to the level curves. The algebraic interpretation is that the gradient is the vector (or list) of 1st partial derivatives, and it equals 0 at the critical points. Likewise, the Hessian is the matrix of all 2nd partial derivatives. The signs of its eigenvalues can be used to classify the critical points. In the case of 2-variable functions f(x,y), the determinant can be used instead of the eigenvalues.

@John2020 It's odd that this use of the documented option laplace doesn't work:

fracdiff(u(t), t, 1/2, method= laplace)

yet this does work:

inttrans:-laplace(fracdiff(u(t), t, 1/2), t, s))

And both statements remain true if you replace u(t) by u(x,t).

You want to change all F(f(x)) to H(h(x)) "where f(x) is really 'anything'". Like @mmcdara , I'm having trouble understanding that. We need to be able to extract the x from f(x) in order to place it in h(x). You can't extract x from simply anything at all.

@nm I only mention the following things for the sake of convenience. There isn't anything wrong with your Answer.

1. For several years now, specfunc(f) has been an acceptable abbreviation for specfunc(anything, f).

2. Both specfunc and anything are initially protected names. Thus, I feel less need to put them in quotes. However, many type names are not protected.

3. specfunc(f) matches functions named f with any number of arguments, including 0.

@nryq The part in red is the Maple code. I believe that this code will work in any Maple version since Maple 13, in any user interface or input mode. The part in blue is the output of the first section of code. There's no need to transcribe that.

Only the 2nd paragraph of the Maple code is needed to get the plot. The purpose of the 1st paragraph of code is simply to give you a sense of how I derived the parametric cylindrical-coordinate representations of the cone and sphere that I used, specifically

  • Cone: [z, phi, z] (transformed from z = sqrt(x^2 + y^2))
  • Sphere: [sqrt(z - z^2), phi, z] (transformed from z = x^2 + y^2 + z^2)

What is your mathematical familiarity with alternate coordinate systems such as polar, spherical, cylindrical?

The functions of x are just dead weight in your computation because there are no differential operations with respect to x. You might as well just make your equation

fracdiff(u(t), t, 1/2) = sqrt(t)/GAMMA(3/2)

That'll make it easier to solve regardless of the method you use (Maple, other CAS, by hand).

Of course, although this equation is in a sense trivial, it's still beyond the documented capabilities of intsolve.

@Kitonum That's a good and interesting example. Note also that add('1,2,3') works, showing that the issue is specifically evaluation, not directly the presence of a variable.

@acer Thanks for the tip. I was refining the whole code anyway, and I had already added option 'real' to the solve command, although I'm not completely confident that that'd eliminate the nonreal problem. To be safer, I'll also filter the floats for nonreals. What do you think?

@janhardo Before I expend too much effort trying to explain the procedures, I need to know whether you understand the math behind this, So, please describe in your own words the method of classifying critical points of multivariate functions known as the "Second-Derivative Test".

Re finding good plot ranges: We have a list of critical points, each with x, y, and z values. Let's say we want the x range. Extract the first coordinate from each point in C. Let m be the minimum of these, and let be the maximum. We don't quite want to make the range just m to M; we want some margin on each side of that. So, we make the range (m - r*(M-m)) .. (M + r*(M-m)) where 2*r is the desired fraction of the overall width that should be margin.

@tomleslie Both sqrt(a) and a^b are uniquely defined and positive for any a > 0b::real. The "cannot determine" issue isn't due to ambiguity; it's due to Maple avoiding floating-point evaluation of symbolic constant expressions unless the user forces it to with is or by some other means.

@bmartin Given that the OP wishes to access the posted procedure from a library, the with command (used at the top level) wouldn't be appropriate, and it doesn't work correctly if used within the procedure (as explained at ?with).

@nryq I put my code for the plot of #2 under my earlier Answer.

@nryq To plot #2, the sphere-capped cone, you need to know that the sphere's center is [0, 0, 1/2] and its radius is 1/2. This Answer doesn't cover the steps (completeing the square) to do that. It's just simple algebra that I find easier to do in my head than with Maple.

Cone:= z=sqrt(x^2+y^2):
Sphere:= z=x^2+y^2+z^2:
simplify(
    changecoords([Cone, Sphere], [x,y,z], cylindrical, [rho, phi, z]),
    symbolic
);
                    [                2    2]
                    [z = rho, z = rho  + z ]
plots:-display(
    plot3d~(
        [[z, phi, z], [sqrt(z-z^2), phi, z]],
        z=~ [0..1/2, 1/2..1], phi= -Pi..Pi, coords= cylindrical,
        scaling= constrained
    )
);

MaplePrimes isn't letting me copy-and-paste plots anymore! You'll need to run the above to see the plot. It looks like a squat ice cream cone.

@dharr The significant difference, which is obscured by your use of 2D Input, is that you've used t__1 instead of the OP's t[1].

@acer Thanks for finding the error. It's now fixed in the Answer above.

@Jennzy26 You've asked many Questions over the past few days, and you've received several Answers with Maple code. But I haven't seen you try to write any. Can you try to write some, even if it's completely wrong? Then I'd be willing to help you correct it.

And, before you can code a solution, you need to understand the math. So, do you understand that my hint implies solving the extremely simple equations {f '(p) = tan(Pi/3), f '(q) = tan(-Pi/3)} where f(x) = 1-x^2, and then the points are P = (p, f(p)), Q = (q, f(q))?

First 108 109 110 111 112 113 114 Last Page 110 of 708