cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Mathcad Community Challenge May 2022 - An Isoperimetric Geometry Problem

DaveMartin
16-Pearl

Mathcad Community Challenge May 2022 - An Isoperimetric Geometry Problem

The first two challenges were biased towards mechanical engineering. May’s challenge pertains to geometry.

Create a worksheet in which you calculate (1) the diameter of a circle and (2) the length of a side of a square that yields the minimum combined area for a combined perimeter of 1 meter.

This is an optimization problem. What tools within Mathcad can provide you with a result?

Optional: How can you depict the results? Can you use a 2D plot or Chart Component to visualize the answer?
Find the Mathcad Community Challenge Guidelines here!

 

Dave Martin - dmartin@creowindchill.com - https://www.creowindchill.com
32 REPLIES 32

Hi,

I'll bite.

Here is one way.

Cheers

Terry

Prime 7 attached - runs on express too.

ppal_2-1651720770993.png

 

 

 

Plot as done by  

Fred_Kohlhepp
23-Emerald I
(To:ppal)

Good solution.  But it won't run in Express (no symbolics, no polyroots)


@Fred_Kohlhepp wrote:

Good solution.  But it won't run in Express (no symbolics, no polyroots)


Also "Minimize" (even without a solve block) is a premium function.
But the derivative operator and the "root" function are not and you can use them for a solution in Express. You just have to manually solve a simple equation 😉

Werner_E_1-1652709078999.png

 

 

Werner_E
24-Ruby IV
(To:Werner_E)

Using a more powerful software you may even visualize by creating an animation 😉

WE20220516-MinimizeProblem-MC15.gif

image.pngimage.pngimage.png

Prime 8 (No Express) version 2.

Let x shows the perimeter of the circle. If x is the answer to minimize the toral area,

image.pngimage.png

ttokoro_0-1652682964664.png

 

With a node to ppal for showing the way, solving using Express (Prime 4.0)

Bodine
5-Regular Member
(To:DaveMartin)

I contribute with an analytical approach.

 

//cheers,

  bengt

MoeSzyslak
4-Participant
(To:DaveMartin)

MoeSzyslak_0-1652741834160.png

 

Bit of labelling would be helpful. This is like a flaming Homer.

But Short and simple.

 

Attach file please.

Werner_E
24-Ruby IV
(To:ppal)


@ppal wrote:

Bit of labelling would be helpful. This is like a flaming Homer.

But Short and simple.

 

Attach file please.


Moe is using real Mathcad and this seems to be a Prime only challenge. Nonetheless I would vote for his solution being the winner.

BTW, because Moe's nice compact solution is using Lagrange and the Nabla operator - is the Nabla operator now finally available in Prime 8 or is it still missing?

 

We could make Moe's solution even a bit more compact by using the symbolic "solve" instead of evaluating the solve block symbolically (which is something not allowed to do in Prime anyway).

Werner_E_5-1652745233522.png

It could even be made a one-liner (but I wouldn't suggest doing so):

Werner_E_1-1652747134062.png

 

If the Nabla operator still is not available in Prime, you would have to do it the hard way

Werner_E_6-1652745279390.png

As usual Primes infamous auto-labeling bug required to manually re-label some variables to make it work.

 

I seem to remember to have read that PTC planned to implement a partial derivative operator. While being only an optical display thing it would be appreciated. Is it already implemented in Prime 8 or was I just reading the roadmap for future versions?

 

 

ppal
16-Pearl
(To:Werner_E)

ppal_0-1652745489592.png

 

Werner_E
24-Ruby IV
(To:ppal)

Thats disappointing! (I assume the pic is from Prime8 )

And how about the partial derivative operator?

Werner_E_0-1652746873751.png

 

ppal
16-Pearl
(To:Werner_E)

Hi

 

MATHCAD 15

ppal_1-1652750255416.png

 

Converted to Prime 8

ppal_2-1652750387278.png

 

 

 

Fred_Kohlhepp
23-Emerald I
(To:ppal)

I knew that the "grad" operator was available in the original Mathcad, but I haven't seen it in Prime.  Yet you show it in the Prime solve block, with a message that it  isn't available.

Fred_Kohlhepp_0-1652784837587.png

So how did Prime execute the solve block?

 

It didn't - its lying and cheating

This is what it really does when you ask it to recalculate:

ppal_0-1652822299129.png

 


So how did Prime execute the solve block?

The converter simply inserted a picture of the Mathcad 15 region.

Prime did  not execute the solve block. As usual for Prime it stores the results of the last calculation within its file and displays them when you open a file. The file is not recalculated automatically when you open a file (as is the case in MC15 with auto-calc on). So the result you see is the result of the last calculation done in MC15 by the converter.
This is also the reason you can use Prime Express as a reader for Prime files which use premium functions. You see what the sheet looked like in full Prime but when you try to recalculate, the premium functions will fail.
So see in ppal's answer that the recalculation in Prime yields just "Find(...)". Actually its an empty solve block without any constraint and as we know Prime won't allow to evaluate a solve block symbolically.

Werner_E_0-1652877803824.png

 

MoeSzyslak
4-Participant
(To:ppal)

Yes, sorry, but as Werner indicates, I am using Mathcad 15. I remain firmly in the camp of "I'll switch to Prime when it can do everything 15 can do".

 

Very nice Flaming Homer reference, btw.


@MoeSzyslak wrote:

 "I'll switch to Prime when it can do everything 15 can do".

Never?

image.pngimage.pngimage.png

 

LucMeekes
23-Emerald II
(To:DaveMartin)

I thought I'd add my 2 cents:

LucMeekes_0-1653340852866.png

And since a result without an animation is not a solution....

MayChallenge.gif

Success!
Luc

ppal
16-Pearl
(To:LucMeekes)

I opened in mathcad 15 

Get errors:

ppal_0-1653341786791.png

ppal_1-1653341822464.png

 

VladimirN
23-Emerald IV
(To:ppal)

This worksheet from 11th version of regular Mathcad.

VladimirN
23-Emerald IV
(To:LucMeekes)

With animation!

Thanks to everyone for your contributions; Dave will be reviewing them in short order since May is now over. I'm hoping for some good discussion and learnings to come out of it!

(Badges will also come soon.)

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.

No June Challenge??

It's bimonthly, so there's been a January, March, and May challenge... and next there'll be a July.

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.

Badges have been distributed to valid entrants; Dave's blog on the challenge has also been published to Mathcad.com: https://www.mathcad.com/en/blogs/community-challenge-isoperimetric-problem

Great job!

I manage the Creo and PTC Mathcad YouTube channels for PTC, as well as all PTC Mathcad marketing in general.
Announcements
NEW FORUM dedicated to Mathcad Installation topics now available!