480 Reputation

6 Badges

14 years, 33 days

MaplePrimes Activity

These are replies submitted by Earl

@Rouben Rostamian  Sorry for the delayed response, I was out of town. I will spend some time absorbing your solution and reply again with any supplementary questions.

@Preben Alsholm Thank you for an enlightening solution.

Can your method also find the value of DthetaZero which yields the simultaneous values theta(t)=Pi and diff(theta(t),t)=0?

@rlopez Your remarks help clarify this powerful coding.

@rlopez Your deconstruction very much helps me to understand Kitonum's code.

However I remain puzzled by the statement:

Hence, y prime = yk and Q*yk is fdy

In the above statement is y prime diff(y(x),x) or is it diff(y(t),t) ?

Please expand on your explanation of this statement.

Also, is it true that a series of line segments must be listed in counterclockwise order for their integrated values to have the correct signs when they are summed toward the total integral over the region?

In Kitonum's second example it appears that the integral of an upward convex curve e.g. sin(Pi*t/3) has a negative value where the integral of an upward concave curve e.g. -sin(Pi*t/3) has a positive value. These values add correctly toward the total integral over the region.

Would this be true for more complex curves such as one which has both upward convex and concave sections within the region?

@Rouben Rostamian  vv:- your suggestion alone permits the boat to cross the same river (same velocity profile, same destination across from the departure) with the boat's speed reduced from 1.0 to 0.82. The time of crossing increases from 1.15 to 1.52 seconds.

  Rouben Rostamian:- your suggestion, while also using vv's suggestion, permits the boat to cross from [0,0] to [1,-0.3] provided its speed is increased from 1.0 to 1.1.

Both of your suggestions allow me to test the limits of the Maple solution. I greatly enjoy such exploration! I thank you both. 

@Rouben Rostamian  Thank you for reading and commenting on my worksheet.

After examining your solution to the least time crossing, here are a few observations:

I animated the boat (as a plot arrow) as it crossed the river following the least time path. It always headed upstream (against the current) with remarkably little variation in its bearing (the value of alpha).

I tried reducing the boat's speed, but any value below 0.935 produced this error message from dsolve;

   Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

This same error occurred if I moved the destination upstream from the starting point, however a destination downstream from the starting point produced a correct least time path.


@Rouben Rostamian  Thank you for your wonderful analysis and solution to my question. I will take lots of time to analyze it, including substituting my worksheet's river velocity function for yours.

@Carl Love Please see my latest reply to Rouben Rostamian. I hope you too can now access Rivercrossing.mw

@Rouben Rostamian  Following Carl Love's advice I renamed my worksheet as one word and it appears to have uploaded successfully. Please let me know if you can now access it.

@Rouben Rostamian  Sorry, I have tried the upload of the worksheet several times and it fails each time, so I deleted the non-working link. Is there another way I can make the worksheet available to you?

In addition I have altered the question's wording to try to clarify that the worksheet animates one river crossing path, namely the boat always heads towards its destination. I would also like to animate a least time path for crossing from the starting point to the destination, which I assume requires a functional definition of the boat's constantly changing heading.

@phil2 Your fix solves this problem.

@Thomas Richard I copied the Sievert routine from a book on bubbles by John Oprea. He was using Maple 5 or 6.

@vv Your fix works very well.

@phil2 This occurs on all worksheets when "quit" is selected in the Maple Debugger window. Below is a very simple example of this output. When "continue' is selected and the procedure completes normal execution only a blank text entry area is added to the worksheet.


restart; with(plots)

A := proc (Rad, a, b) DEBUG(1, Rad, a, b); plot3d([Rad*cos(theta)*sin(phi), Rad*sin(theta)*sin(phi), Rad*cos(phi)], theta = 0 .. Pi, phi = 0 .. 2*Pi, scaling = constrained) end proc:

A(1, 2, 3);

Warning,  computation interrupted



   2   plot3d([Rad*cos(theta)*sin(phi), Rad*sin(theta)*sin(phi), Rad*cos(phi)],theta = 0 .. Pi,phi = 0 .. 2*Pi,scaling = constrained)



Download DEBUG_example.mw

First 7 8 9 10 11 12 13 Page 9 of 14