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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to create rectangles in Mathcad Prime?

Cornel
19-Tanzanite

How to create rectangles in Mathcad Prime?

Hello,

The right endpoints of the five intervals are:

Cornel_0-1690804180127.png

 

where i = 1, 2, 3, 4, 5.

The width of each rectangle is:

Cornel_2-1690803977641.png

and the height of each rectangle can be obtained by evaluating f(x) at the right endpoint of each interval.

 

Cornel_4-1690804049340.png

 

How to create the below rectangles in Mathcad Prime (8)?

Cornel_0-1690803867683.png

 

ACCEPTED SOLUTION

Accepted Solutions
ttokoro
20-Turquoise
(To:Cornel)

13 REPLIES 13
ttokoro
20-Turquoise
(To:Cornel)

image.png

Cornel
19-Tanzanite
(To:ttokoro)

So, I need a function in which that if we give the Width and the Height of a rectangle, that function to draw the rectangle based on the Width and Height. Width to be a parameter that can be modified. Height to be a parameter that can be modified.
Cornel_0-1690809691654.png

Cornel_1-1690809699727.png

 

 

 

Cornel_3-1690809716870.png

Cornel_4-1690809727005.png

 

Cornel
19-Tanzanite
(To:ttokoro)

@ttokoro 

 

Cornel_0-1690810547532.png

Cornel_5-1690810487085.png

In the first case (inscribed rectangle):

Cornel_4-1690810207616.png

Width is:

Cornel_1-1690810453350.png

 

Height is:

Cornel_2-1690810460712.png

 

 

In the second case (circumscribed rectangle):

Cornel_5-1690810233599.png

Width is:

Cornel_3-1690810468726.png

 

Height is:

Cornel_4-1690810475665.png

 

ttokoro
20-Turquoise
(To:Cornel)

image.pngimage.png

Cornel
19-Tanzanite
(To:ttokoro)

Can you tell me the options that you have selected in the Plot -> Change Type for this graph for each function: f(t), f(t). df(t), df(t), df(xi)?
Cornel_0-1690813580358.png

 

 

Can you tell me the options that you have selected in the Plot -> Change Type for this graph for each function: f(t), df(t), df(t), f(t), df(xi)?

Cornel_1-1690813705717.png

 


Or maybe if you can upload a Mathcad Prime 8 file then it is ok even this way.

Cornel
19-Tanzanite
(To:Cornel)

@ttokoro 
Cornel_0-1690814638907.png

 

Cornel_2-1690814677351.png

Cornel_3-1690814684351.png

Cornel_4-1690814691251.png

 

Cornel_5-1690814698030.png

Cornel_6-1690814704704.png

In Plot -> Change Type:
f(t) - Line Trace
df1(t) - Column Trace
df1(t) - Line Trace
df1(xi) - Column Trace

 

 

Cornel_7-1690814805909.png

Cornel_8-1690814813198.png

In Plot -> Change Type:
f(t) - Line Trace
df2(t) - Line Trace
df2(t) - Column Trace
df2(xi) - Column Trace

 

In your case, how you marked this options? How you did?

 

 

 

 

Cornel
19-Tanzanite
(To:Cornel)

@ttokoro 

For the first case I found how to do:

Cornel_0-1690815309154.png

In Plot -> Change Type:
f(t) - Column Trace
f(t) - Line Trace

df1(t) - Column Trace
df1(t) - Line Trace
df1(xi) - Column Trace

For the second case, I still do not find the correct options:

Cornel_2-1690815475105.png

What are In Plot -> Change Type:
f(t) - ............... Trace
df2(t) - ............... Trace
df2(t) - ............... Trace
f(t) - ............... Trace

df2(xi) - ............... Trace

Cornel
19-Tanzanite
(To:Cornel)

@ttokoro 
So, it is ok now. I found now how to set-up each function in Plot -> Change Types also for the second plot:

Cornel_0-1690876360816.png

In Plot -> Change Type:
f(t) - Line Trace
df2(t) - Line Trace
df2(t) - Column Trace
f(t) - Column Trace

df2(xi) - Column Trace

Cornel
19-Tanzanite
(To:Cornel)

@ttokoro 

Cornel_1-1690876973464.png

 

How to change this functions in order to have different width for the rectangles?

 

Cornel_2-1690876998571.png

Cornel_3-1690877005285.png

 

Cornel_4-1690877017884.png

 

 

 

ttokoro
20-Turquoise
(To:Cornel)

image.pngimage.png

Cornel
19-Tanzanite
(To:Cornel)

The above case is for inscribed rectangle.

@ttokoro 
But there is a second case (circumscribed rectangle):

The left endpoints of the five intervals are:

Cornel_0-1690806305429.png

where i = 1, 2, 3, 4, 5. The width of each rectangle is :

Cornel_1-1690806323466.png

and the height of each rectangle can be obtained by evaluating f(x) at the left endpoint of each interval.

Cornel_2-1690806375161.png

Werner_E
25-Diamond I
(To:Cornel)

Again Prof. Birkelands Hatch functions can come handy.

Look up his examples for the Riemann sums and also for the trapezoid method in the already posted file.

Werner_E_0-1690823655690.png

 

You may also be interested in this thread

https://community.ptc.com/t5/Mathcad/Simple-Riemann-sum/m-p/93217

Who knows, some of the files posted there may even work in Prime after conversion.

 

Cornel
19-Tanzanite
(To:Werner_E)

Yes, the subject of this topic is about Riemann sums, how to make that rectangles (with different width and height) for some functions. Only for better understanding of integral calculation/concept...

Announcements

Top Tags