Vecto-Valued Functions and Mathcad D P Mostad, Univesity of Noth Dakota Ojectives of Assignment 1 To lean how to make Mathcad gaph two- and thee-dimensional vectovalued functions To lean how to make Mathcad display these gaphs with useful axis anges and appopiate aspect atios 3 To examine a vaiety of vecto valued functions and thei gaphs I Using Mathcad to Gaph Two Dimensional Vecto Valued Functions Suppose you want to gaph the cuve defined y 3 ( = t i + ( t 4 j To do this with Mathcad, you need to do thee things: 1 Fist, define the component functions: x ( 3 4t Second, BELOW the definitions Inset an X Y Plot 3 Thid, type x ( in the placeholde along the x-axis and y ( in the placeholde along the y-axis You gaph will look like the left gaph elow, ut you want it to look like the ight one: 0 0 0 0 50 6 6 6 5 4 3 1 8 7 6 5 4 3 11 01 3 4 5 6 7 8 3 4 5 6 8 8 13
To get the ette view of this vecto-valued function, you will need to change the scale of oth axes and alte some fomat options of the plot Mathcad plots gaphs in a ectangle athe than a squae It is impotant to compensate fo this so that cicles will look like cicles and ellipses will look like ellipses This is called the aspect atio You will need to use an x:y aspect atio of 4:3 Click in the plot aea and change the lowe left and ight numes to 8 and 8 espectively That will limit the x-axis fom 8 to 8 Then change the top nume along the y-axis to 6 and the ottom nume to 6 That should make you vecto-valued function look like the second gaph up aove It is impotant to always change the scales of the axes so you will e ale to see the inteesting featue of you gaph and to coect the aspect atio Only a fool would always accept a softwae package s defaults You will also enefit fom alteing some fomat options Doule-click the plot aea to open the X-Y Plot Fomatting dialogue ox Make the following changes: Click oth Gid Lines Deselect oth Auto Gids and change to 16 and 1 Select Cossed Afte making these changes, you plot should look like the second one aove IMPORTANT: Fo this assignment, always use gaphing windows that have an x:y aspect atio of 4:3 That is, use 4 x 4 and 3 y 3, o 8 x 8 and 6 y 6, etc This popotion will guaantee that squaes will look like squaes instead of like aitay ectangles, and that cicles will look like cicles instead of ellipses II Animation, Cicles, Ellipses, and Vaiations Gaph ( = ti + 4 sin( j y defining the component functions and then coecting the aspect atio Also change the fomat options to those used aove You should see a typical sine cuve with amplitude 4 14
Next, change you the defintion of the i component so you vecto valued function is ( = 4cos( i + 4sin( j The gaph of the sine wave should change to a cicle of adius 4 Now to animate the cicle Fist we will make the t go fom 0 to in steps Change the i and j component functions to: : = 4cos( : = 4sin( (eview the fist compute la unit if you don t ememe how to ente π o the faction a) The is in thee so that if we make t go fom 0 to, then t will go fom 0 to That is, when t = 0, then π t = 0 (NOTE: if you want to go fom π to π in steps, you could use if you want to go fom 3π to π in steps, you could use π t π ; 4π 3 9 t t π ; if you want to go fom 3 to 6 in steps, you could use 3 This is applying the stetch and shift technique to the agument of the component functions) Second we must make something go fom 0 to Let s use a This is accomplished in Mathcad using the FRAME vaiale ABOVE the X-Y Plot, type: a := 0, 1; FRAME (you must use all uppecase fo FRAME) Since we ae using a, in the X-Y Plot change the to a) and to a) Finally we can make it animate 1) Click on VIEW and select ANIMATE to open the animate contol ox ) Change the settings so it goes Fom: 0 To: At: 50 Fames/Sec 3) Click and dag the mouse to daw a ectangle aound the X-Y Plot 4) Click on Animate in the animate contol ox This should animate the dawing of the cicle At it s conclusion, a playack ox with a slide appeas on you sceen Move the slide to take notice of whee the paametic cuve stats, ends, and in which diection it goes (clockwise o counteclockwise) 15
Now fo some vaiations Change you component functions (you don t have to type in new ones) to the following and animate the gaphs to notice how the vaious changes alte the diection of the path and the stating and ending points Change to: Change to: : = 6cos( : = 6sin( : = 6sin( : = 4cos(, then animate to see stat, end, and diection, then animate to see stat, end, and diection Change to: : = 6sin( : = 4cos(, then animate to see stat, end, and diection Ty to find paametic equations that tace out the ellipse x + y = 1, stating 5 9 and ending at (-5,0) going in the counteclockwise diection III Hypeolas and Lissajous Figues To gaph a hypeola, simply switch to hypeolic functions Using the same definitions and X-Y Plot you wee using fo cicles and ellipses, make the following changes : = 4cosh( Change to: : = 4sinh( Notice that this only gaphs the ight half of the hypeola To see the left half, you need to change the i component to : = 4cosh( Ty switching the sinh and cosh aound fo the and, and ty coefficients othe than 4 to see how changes in these values alte the cuve Now fo some Lissajous figues These ae ased on sine and cosine, as the cicles and ellipses ae, ut the fequencies of the sine and cosine ae not equal These will e viewed est with animation Change you definitions ack to : = 6sin( : = 4cos( This will let you animate a simple ellipse Now multiply the agument of the sine component y 3 y changing it to: : = 6sin(3 : = 4cos( 16
Change the X-Y Plot ack to a) and a), and animate Fom: 0 To: At: 50 Fames/Sec It should e appaent what multiplying y 3 does Now also multiply the cosine agument y 5 y changing it to: : = 6sin(3 : = 4cos(5 Animate this as well Ty multiplying y numes othe than 5 and 3 to see how they wok in unison to ceate diffeent types of Lissajous figues IV Standad Cuves and Paths Standad functions of one vaiale such as f(x) = x ae easily epesented y vecto valued functions Simply use x ( = t and y ( = f ( Fo example, fo f ( x) = x, gaph ( t ) = ti + t j Change the X-Y Plot settings so the x-axis goes fom to, and the y-axis goes fom 0 to 3 Let a :=, 19FRAME Animate this Fom: To: At: 50 Fames/Sec To get y = x you only need to make sue that the y component is the x component squaed Fo example, it still woks if you let you gaph will e pat of pat of the paaola x ( = sin(, = sin( y = x Animate this and ty to figue out why this only plots 3 3 Fo f ( x) = x x 5x + 6, use x ( = t, = t t 5t + 6 This looks est with the x-axis going fom 4 to 4 and the y-axis going fom 10 to 10, ut this is not a 4:3 aspect atio, the gaph is stetched out hoizontally IV Gaphing Thee Dimensional Vecto Valued Functions with Mathcad Thee-dimensional vecto-valued functions ae a easy to gaph with Mathcad, ut unfotunately you can t animate them Just like with two-dimensional vecto-valued functions, Mathcad will automatically choose which sections of the coodinate axes to show, ut you can alte it y doule-clicking the plot window and changing the settings Mathcad uses the 3D Scatte Plot fo space cuves, ut y default it only plots a few points along the cuve You will have to change the settings to get a cuve To gaph 3 ( = ti + t j + t k type: 17
z( 3 Then click you mouse somewhee BELOW these definitions Go up to Inset, Gaph and choose 3D Scatte Plot This will inset a 3D Scatte Plot ox on you sceen In the placeholde in the ottom left cone, type (x, y, z) You must put lists of component function names in paentheses That should give you a plot of points in space To ette see thei positions in space, click on the gaph and dag Petty slick To impove on the default 3D settings, doule-click on the gaph, and make the following changes to appeaances: Select Appeaance Ta Deselect Daw Points Select Lines Select Colomap To adjust the axes, while still in the 3D Plot Fomat ox click the Axes ta and make the following changes to the x-axis, y-axis, and z-axis tas: Select Axes Ta Deselect Auto Scale Change to -10 and 10 Also make these changes unde the y- and z-axis tas When you examine these thee-dimensional gaphs, ememe that the axis as shown on the sceen ae not intesecting at the oigin Ty gaphing the following thee-dimensional vecto-valued functions 1 Gaph ( = cos( i + sin( j + tk Use x, y and 10 z 10 This gaph and many thee dimensional paametic plots will enefit fom changing the ange of the paamete t By default, Mathcad uses 5 t 5 To change it to 10 t 10 doule click the gaph and make the following changes unde the QuickPlot Data ta: 18
Select QuickPlot Data Ta Change to -10 and 10 Change to 50 Gaph ( = cos( i + sin( j + t k Leave settings the same 3 Gaph ( = cos( i + sin( j + sin( k Leave settings the same 4 Gaph ( = ti + sin( j + cos( k Use 10 x 10 and y, z Vay the fequencies and amplitudes to see what else happens V Some Fancie Two Dimensional Cuves All of the following cuves should e smooth except at a few specific points You will e using a vaiety of values fo, and c, so fist define them with some initial values: : = 0 5, : = 05, c : = 0 5 Then define you component functions BELOW these thee vaiale definitions These gaphs will need to e animated to adequately contol Mathcad s use of the paamete t Use a := 0, 01 FRAME Fo many of these, you will want to go fom 0 to Since is just a little less than 7, use Fom: 0 To: 7 At 5 Fames/Sec in the Animate contol ox Fo the fist two, use to You might need to incease the ange of the paamete fom to 4π o 8π on 3), 4), and 5) elow 1 Cycloids Suppose you ae diving along some wam summe night and a icycle ide cosses you path aout a lock ahead of you If he has a eflecto in his spokes, you will notice a vey distinctive path that the eflecto is taking The close the eflecto is to the tie, the moe distinctive the path and movement will e If you have eve seen this, the eflecto seems to kind of hop along athe fenetically If the eflecto is mounted ight on the side of the tie, the path it will follow is called a cycloid The vecto valued function which descies a cycloid is: s( = ( t sin( ) i + (1 cos( ) j whee is the adius of the tie Use 0 x 10, y and set the options in X-Y Plot so Auto Gid is not selected and set the nume of gids to 7 fo x and 4 fo y Gaph a few of these using = 05, 075, and 1 When typing these definitions, e sue to 19
include the multiplication symol etween the and the paenthesis, othewise Mathcad will think is suppose to e a function While using the slide, notice that movement along the path of the cuve is faste at the tops than at the cusps at the ottom Tochoids If the eflecto happens to e somewhee etween the tie and the axle, the path it will follow is called a tochoid It is somewhat diffeent fom a cycloid The vecto-valued function fo a tochoid is: s( = ( t sin( ) i + (1 cos( ) j whee is the adius of the tie and is the distance fom the eflecto to the axle Ty a few of these using the same values as in #1 along with some values of which ae etween 0 and 3 Epicycloids If the icycle wheel happened to e olling aound the outside of a lage cicle, then the path of the eflecto is called an epicycloid The vecto-valued function is: + s( = (( + ) cos( cos( + ) i + (( + )sin( sin( )j whee is now the adius of the lage cicle, and is the adius of the wheel When =, the esulting epicycloid is called a cadiod Change the axis to a tue aspect atio using 8 x 8, 6 y 6 Gid lines will e helpful hee, too (16 and 1) Ty =, = ; =, = 1; = 15, = 5; = 1, = Ty a few othe values of and You might have to incease how lage the paamete ecomes y inceasing the To: value in the Animate ox 4 Hypocycloids If the wheel is olling aound inside a lage cicle, the path of the eflecto is called a hypocycloid The vecto-valued function fo a hypocycloid is: s( = (( )cos( + cos( ) i + (( )sin( sin( )j whee is the adius of the lage cicle and is the adius of the wheel You don t need to type these in, just modify the equations you used fo the last polem Gaph a few of these using = 4, = 1; = 3, = 1; =, = 1; = 5, = 3 5 Spiogaph pattens The Spiogaph toy is just a simple mechanical device which allows you to tace epicycloids and hypocycloids whee the pencil (o the eflecto, if you want to use the icycle analogy) is not ight on the edge of the wheel, ut is somewhee etween the edge of the wheel and its cente These cuves can e epesented y vecto-valued functions as well These ae just slight modifications of the hypocycloid function simply multiply the denominatos y a facto c: s( = (( )cos( + cos( ) i + (( )sin( sin( )j xc xc 0
You don t need to type these in, just modify the equations you typed in fo #4 Ty some of these using the same numes as in the last polem, ut then use 05, 04, 1,, and 3 fo c 1