Earl

980 Reputation

8 Badges

18 years, 317 days

MaplePrimes Activity


These are replies submitted by Earl

@Rouben Rostamian  I thought I recognized the law of cosines but was thrown off by seeing derivatives multiplied within one of its terms. 

Thank you for your clear explanation.

Later I discovered that the statement below also yields the pearl's kinetic energy.

simplify((1/2)*m*VectorNorm(v, 2, conjugate = false)^2)

@Rouben Rostamian  Lovely code.

I am going to try using your technique to flatten the more complex dodecahedron and icosahedron.

@Kitonum Further changes to Contourplot_with_Labels corrects the problems you identified.
 

Contourplot_with_labels.mw

@Kitonum Originally I only intended for this modification to handle curves defined as [f(x,y),g(x,y),x or y] . 

Taking your review as motivation, I will try to modify the modification to work with examples such as you have given, namely

[f(x,y),g(x,y),h(x,y)].

I admire your work and appreciate your interest.

Thank you for this clear insight.

@Joe Riel Are my comments below correct? Does the discrete event below have to contain the discrete variable dv(t)? 

DE1 := diff(x(t), t, t) = -x(t)-(diff(x(t), t))+y(t):

DE2 := diff(y(t), t, t) = y(t)-(diff(y(t), t))+x(t):

ICs := x(0) = 0, (D(x))(0) = 1, y(0) = 0, (D(y))(0) = 1, dv(0) = 0:

sol1 := dsolve({DE1, DE2, ICs}, {x(t), y(t)}, numeric, discrete_variables = [dv(t)], events = [[x(t)-1, dv(t) = 10], [[0, dv(t) > 1], dv(t) = -dv(t)]]):

odeplot(sol1, [t, dv(t)], -1 .. 3, title = "Plot of dv(t)", titlefont = [Courier, bold, 14]);

The second event is a discrete event with a conditional trigger and only occurs when a prior event (here the first event) has earlier occurred i.e. if the first event is omitted the second does not occur, even if option event_initial is true. If the action on the second event is halt, the halt occurs but the odeplot of dv(t) shows its value as zero. Why?

@Preben Alsholm Your suggestion works, but I would still like to know all the capabilities of the conditional trigger feature.

@Rouben Rostamian  Thank you Rouben.

Your use of the Lagrangian probably fits more diverse motion scenarios than mine.

In addition your second order ODEs are directly solvable by Maple whereas I had to manually reduce mine to first order when Maple's dsolve, numeric sent me a message that Maple could not perform this reduction. 

@acer You have supplied an example of what I meant i.e. a procedure invoked by a plot command to tailor some aspect of the plotted display, in this case its color.

Thank you for your effort and I apologize for this delayed reply, I was tied up in family business.

 

@acer I like your code in which the plot command itself accomplishes the rotation of colors around the circle as, at the same time, it translates the circle along the x axis.

Please see my reply to tomleslie where I ask whether this can be accomplished by a custom color scheme as portrayed in the colorscheme help page. 

@tomleslie I appreciate your ingenious way of "marching" the colors in arcs around the full circle.

The colorscheme help page contains an example of the colorscheme parameter invoking a separately defined procedure to implement a custom color scheme.

I am intrigued by this but I don't understand what data is communicated from the example's plot3d command to procedure p and what such a procedure must return to the plot3d command.

Can the rotating colored circle be implemented using an analogous method? If possible, then the plot command could itself perform the equivalent rotation and translation.

@vv This integral is from Problem 14 in Paul J. Nahin's book How to Fall Slower than Gravity.

@Ramakrishnan Much appreciated.

First 11 12 13 14 15 16 17 Last Page 13 of 24