Calculators

Manual / Guide · c. 1980

Sharp PC-1211 Applications Manual

Read the PDF ↗

Sharp's 314-page book of application programs for the PC-1211: equations, matrices, statistics, coordinates and more.

Author
Sharp
Year
c. 1980
Type
Manual / Guide
Credit
Sharp; scan via Valentin Albillo's archive.

← Back to the Reference Library

Sharp PC-1211 Applications Manual

POCKET COMPUTER 2 ayes § Po ar ee | NIA RE BB hee Ba L ia VERALN i SHARP POCKET COMPUTER PC-1211 APPLICATIONS MANUAL Thank you for your purchase of the Sharp Pocket Computer PC-1211. This booklet covers a variety of fields of science and exemplifies computation programs pertinent to those fields. We shall be delighted if you arrange those programs yourselfs by reference to the practice in this book so that they best serve your purposes and your computer can display its full capability to be a help for your solving complicated problems. This manual has been, on our side, edited in accordance with the following standard. We ask you to read it through before starting to operate your machine. 1, Title Each program is given a brief TITLE summarizing the contents of the program. . Program No. P4 shows this machine, next A ~ X shows the classification. . Formula This column shows the nature of each program and the mathematical expressions pertinent to it. . Example In this column, the calculation example is given. . Operation This column gives the key operation needed to execute a given program based on data shown in the column “Example”’. Every program requires DEF mode setting (For the way of DEF mode setting, consult the Instruction Manual of the PC-1211. “CLOAD Label” ” refers to the key operation that is required when programs re- corded on a cassette tape are used. Therefore, this operation must not be made after pro- gramming has been accomplished in the PRO mode. Labels are, in principle, identical to the codes given in the column “PROGRAM NO.” . Program List The list, made by a special device, reveals the process of entering the program concerned. The relation of the program list and the key operation of the PC-1211 are explained in the next page. Write the program in the machine in accordance with the program list. (Note) Before used, every program must be, after written in the machine, checked enough by reference to “Exampe,” etc. whether it is perfect or not. . Memory Contents This list gives a part of memory contents included in each program. Meanwhile, note that the manual is subject to enlargement or revision without prior notice. If you find any imperfections in the manual, please write to us. (Notice) Our company is not reponsible at all for monetary losses and missed profits that could arise in the use of this applications manual. A sub-routine uses, in principle, the 501th and subsequent lines. GO SUB 1 is two steps shorter than GO SUB 500. In terms of the number of steps, some programs are made so that smaller line numbers are affixed to their sub-routines. For program lists, note the following instructions. 1. When you enter the program to the PC-1211 in accordance with the program list of this manual, set the machine at the PRO (program) mode and press the [N) (E] (Ww) (niém) keys to clear the program memory. 2. Press the key at the end of each line. 3. The above operation automatically forces a colon (:) to follow directly behind each line number. No colon needs to be written. 4. It requires a space command to create a blank between double wedges ¥¥ VV, but does not require it to create a blank behind each command that is expressed by two or more characters. The following exemplifies this. Numeric 0 -——* Acolon directly behind each line number is entered without the need to press the a key. 7 WwW —m Press the (wi key following the key. [ ———» Noneed to press the [5?¢| key. Press the (EXTER) key, which creates a print a of line end mark. "A" SPAUSE! “MANNING” INPUT "R= "SR/"H= “GHe"L=O"FL "NS “EN I=H/L:C=R4(1/6) JN It is required to press the [s*] key. ——™ Press the ica key following the (SHI! key. Wi twos ooo 20 0 [~ This indicates the [Exe] key located on the left of the [+) key. ee Numeric 0 419: IF CABS F>=E-4)+(ABS G>=E-4)<>OLET A=A+ F:B=B+G:PAUSE FeG:GOTO 400 420: GOSUB 900 ——+x This indicates the OG key -- a alphabet key. (Note) © Use the (ENTER) or [sP¢] key properly. © The number of the last line in the program list indicates the number of step used. 5. After entering the contents of the program list to the PC-1211, when you execute the program without using a cassette tape, skip the operation "CLOAD WV iabel T (eieR} _, and set the machine at the DEF (definable) mode. For { Operation }, vy ly. Press the {Surt wi keys CLOAD ‘a7 Giitéa) When executing programs recorded on the tape (CLOAD), make the CA operation (press the (ON) key twice successively) before loading them. If the above operation is not made, an error could occur in print. The operation is not necessary when programs are written through keys, P4—A—1 P4—A-2 P4—A--3 P4--A—4 P4—A-—S P4—A-6 P4—A-7 P4—A-8 P4—A-9 P4—A—10 P4—A-11 P4—A-12 P4—A—13 P4—A—14 P4-B-1 P4—B-2 P4_B-3 P4-B—-4 P4—B—5 P4—B-6 P4—B-7 P4-B-8 P4—B-9 P4—B--10 P4—B-11 P4—B—12 P4—B-13 P4—B-14 P4—B--15 P4—B—16 P4—B-17 P4—B—18 P4—B—19 P4—-B—20 P4—B—21 P4—B-—22 SHARP POCKET COMPUTER PC-1211 CONTENT Page SIMULTANEOUS EQUATIONS... 2... 0202.2 1 INVERSE MATRIX . 2... tee eet eens 3 DETERMINANT. . 00... tee ett 5 PRODUCT OF MATRICES MUTUAL CONVERSION, AND ADDITION AND SUBTRACTION BETWEEN DECIMAL NOTATION AND OTHER NOTATION............-. 9 MUTUAL CONVERSION BETWEEN RECTANGULAR COORDINATES AND POLAR COORDINATES ............-.0 200s eee il ROOT DETERMINING CALCULATION ACCORDING TO NEWTON’S METHOD......... 0.20.00. eee 14 QUADRATIC EQUATION. .... 2.0.0... eee ee eet ene 16 EQUATION OF THIRD DEGREE.................20 cece eect eeeee 18 EQUATION OF FOURTH DEGREE ...............2.2- 200 eee eens 22 APPROXIMATE DEFINITE INTEGRAL BY SIMPSON’S METHOD.......... 25 FIRST ORDER DIFFERENTIAL EQUATION ...............0000000005 27 MULTI-ELEMENT SIMULTANEOUS FIRST ORDER DIFFRENTIAL EQUATIONS ..........-.0-0 2 ee eee eee teens 29 EIGENVALUE. 0... c cece ce ec ceeceuecteneeuvetuceeretansnes 34 5 0 eee 38 POISSON DISTRIBUTION AND BINOMIAL DISTRIBUTION .............. 40 NORMAL DISTRIBUTION AND PERCENTILE ...............22---0005 42 ESTIMATION OF INTERVAL OF PQPULATION MEAN AND POPULATION VARIANCE..........0.0 00000 cc eee eee eens 44 TEST OF MEAN AND VARIANCE .... 20.0.0 .00 0.0.00 eee eee 47 TEST OF DIFFERENCE IN MEANS, RATIO OF VARIANCES ............ 51 REJECTION TEST, TEST OF CORRELATION COEFFICIENT, TEST OF GOODNESS OF FIT... 11... ee een eee 53 2x2 CONTINGENCY TABLE, 2 xn CONTINGENCY TABLE ............. 56 mxn CONTINGENCY TABLE... ... 00.20.0000 0 cee tenet ene 58 CORRECTION MOVING AVERAGE ........ 0.0.0.0 e eee eee eee 60 RANDOM NUMBERS... .........0 0.22200: cee ete eee n eee eee 63 SUM OF PRODUCTS, CORRELATION COEFFICIENT, LINEAR REGRESSION (y =ax tb)... cect nets 64 EXPONENTIAL REGRESSION ... 1.20.0... . cece ete eee 66 CORRECTION EXPONENTIAL CURVE. ........0 0.0.0.0. 0 cece eee eee ene 68 LOGISTIC CURVE. .. 0.0... cece eee n teen eneee 72 I-WAY LAYOUT ...... 2.0. tent nee nnee 76 2-WAY LAYOUT... 0... ce eee t ene ene 78 2-WAY LAYOUT (WITH REPETITIONS). .........0... 0000 cee eee eee 81 x—R CONTROL CHART, Pn CONTROL CHART. ........ 00.0000 02 cee 85 Lg ORTHOGONAL ARRAY TABLE..........0 20.000 cece eee ee eens 88 Lyg ORTHOGONAL ARRAY TABLE ............ 00.00: cece eee tee 90 SPEARMAN RANK ORDER CORRELATION COEFFICIENT ............-- 93 P4—C-1 P4—C-2 P4—C-3 P4—C-4 P4—C-5 P4—C-6 P4—C-7 P4_C_8 P4—C-9 P4—C-10 P4—C-11 P4-C-12 P4-C-13 P4-C-14 P4—C-15 P4—C—16 P4—C—17 P4—C—18 P4—C-19 P4—C—20 P4—-C-21 P4—C-22 P4—C—23 P4—C—24 P4—C—25 P4--D-1 P4—D-2 P4—D—4 P4—D—S P4—D-6 P4—D-7 P4—D-8 P4—D-9 P4—E-1 P4—E-2 P4—E-3 P4—E—4 P4—E-5 P4—E-—6 ANGLE CALCULATIONS. 0.0.0.0. 0. teens 95 OPEN AND RADIATE TRAVERSE .... 0... 00.2 c eee eee 97 CLOSED AND FIXED TRAVERSE (COMPASS RULE) .............-...-. 99 INVERSE CALCULATIONS OF OPEN AND RADIATE TRAVERSE........ 102 COORDINATE AREA CALCULATION .. 2.0.2.0 2c cece ee eee 104 DIAGONAL AND PERPENDICULAR AREA CALCULATION............. 106 TRIANGLE CALCULATIONS... 0.0.0.0 cece tenes 108 POINT ON STRAIGHT LINE AND PARALLEL MOVING POINT.......... 111 STADIA CALCULATION .. 1.0... eee teens 113 SINGLE CURVE CALCULATIONS . 1.0... cee 115 CLOTHOID CURVE, 1.0.0... c ccc ee eee tenes 117 COORDINATES CONVERSION. . 2... 2c ce eee eens 119 CHAMFER CALCULATION ...... 0.0... 0c 121 INTERSECTING POINT AND PERPENDICULAR CALCULATION ......... 123 A POINT AT A CERTAIN DISTANCE FROM TOW POINTS (INTERSECTING POINTS OF TWO CIRCLES) ............ 00000200005 126 CITY BLOCK VERTEX CALCULATION. .......... 0.00 cece ence eee 128 DIVISION INTO SPECIFIED AREA BY SPECIFYING A POINT IN A POLYGON. 2... 00 eee te eee eee nee 130 PARALLEL SPECIFIED AREA DIVISION. ....... 0.0006 cece eee ee eens 132 VERTICAL SPECIFIED AREA DIVISION ............ 0000 cee eee eens 134 LONGITUDINAL CURVE (QUADRATIC PARABOLA)...........--.-5055 136 INTERSECTING POINTS OF CIRCLE AND LINE...............-00005 138 RADIAL AREA CALCULATION. .. 0.066. 140 OPENING SPECIFIED DIVISION CALCULATION ................-00-% 142 CLOSED AND FIXED TRAVERSE (COMPASS RULE) ...............+.- 144 DIAGONAL AND PERPENDICULAR AREA CALCULATION ............. 148 GIRDER LOAD TERMS CALCULATION PROGRAM FOR REINFORCED CONCRETE CONSTRUCTION .......0.0.0.0c0eceeeeee 150 FORCE OF SECTION OF SIMPLE BEAM (UNIFORMLY VARYING LOAD, TRAPEZOIDAL) ..............0.0-.- 159 CORRECTION COEFFICIENT OF DISTRIBUTION SHEARING FORCE DUE TO TORSION..........0...... 000 cece cece eee e eee 161 STRESS CALCULATION OF THREE HINGED POINT GABLED ROOF FRAME...........0..0 00.0 ccc eee eee eeeeeeeeees 166 RIDGE DEFLECTION CALCULATION OF GABLED ROOF FRAME (COLUMN BASE PIN, UNIFORM DISTRIBUTION)................-0-5 169 DESIGN OF END PLATE JOINT PART...........0.0.00.0 cee ee eee 171 SECTIONAL AREA A, MOMENT OF SECOND ORDER I, SECTIONAL COEFFICIENT Z (PART 1)....0 00.0000 cece cece cece eee eeeeeees 174 A, I, Z OF VARIOUS SHAPES (PART 2).........0.0000. eee cee cece 176 IMPEDANCE IN A SERIES CIRCUIT........0..0.0.0-0 20 ccc cece eens 179 IMPEDANCE IN A PARALLEL CIRCUIT. ....... 00.00. ccc eecceseees 181 SELF-INDUCTANCE ON A STRAIGHT LINE...........0-0-0s0eceeee 183 A>Y TRANSLATION. ...... 000.0000 0 cece cece e cece eee seenees 185 Y>A TRANSLATION. ......00 00.0000 cece eve ce cece eeececeeveees 187 P4—F—1 P4—F—2 P4--F--3 P4—F—4 P4—F_—5 P4—F-6 P4—F-7 P4—-P-8 P4—P-9 P4—F-10 P4—F—11 P4_-G— P4—G—1 P4_G-2 P4—G-3 P4-G—4 P4—G-5 P4—-G—6 P4—G-7 P4—G—8 P4.-G—9 P4—G—10 P4—-G—11 P4-G—-12 P4-G--13 P4-G-14 P4--H—1 P4—H—-2 P4—H-3 P4—H—5 P4—H—7 P4—-H-8 P4—H-9 P4—H—10 P4—H—14 P4—H-15 P4—H-16 P4—H--17 SECTION, DEAD LOAD AND CENTROID OF A POLYGON............. 19 COULOMB’S COEFFICIENT OF EARTH PRESSURE. ...............00- 19 STABILITY OF A SLOPE (METHOD OF SLICES).................00. 19 BENDING STRESS OF SIMPLE GIRDER.............. 000000002 e eee 19: INTERNAL FORCE OF A SIMPLE GIRDER (UNIFORM LOAD).......... 20) INTERNAL FORCE OF A SIMPLE GIRDER (UNIFORMLY VARYING LOAD).........0.0.0.0 0000000 cece cece eee 20: VELOCITY OF FLOW AND FLOW RATE (MEANNING’S FORMULA AND GANGUILLET-KUTTER’S FORMULA)..... 20. VELOCITY OF FLOW AND FLOW RATE............- 0.000 c eee u ee 201 CHANNEL SECTION. 00.0... 0000 ec ccc eee cece stent eee 208 STRESS INTENSITY OF SINGLE REINFORCE REINFORCEMENT’S T-SHAPED SECTION... 0.0.0.0 ccc cece eect eect eee ees 21 SECTION OF SINGLE REINFORCEMENT’S T-SHAPED GIRDER.......... 21 GRAPHIC CALCULATION... 000.0000 cence eee eee 2L: DISTANCE BETWEEN TWO POINTS AND ANGLE................00-. 2K INVOLUTE, INVERSE INVOLUTE.... 0.0.0.0... 0000 e cece eee eee 2K THE POINT OF INTERSECTION OF TWO STRAIGHT LINES a 22 A TANGENT LINE FROM ONE POINT P = P/C...............0..--05 22: POINTS OF INTERSECTION OF TWO CIRCLES P = C/C............... 22 A CIRCLE TANGENT TO TWO LINES C = L/L............0..0000-- 22¢ INTERSECTION OF A CIRCLE AND A LINE P= L/C.-.............. 228 A LINE TANGENT TO TWO CIRCLES ......00.0. 0.000 ccc eee eevee 23 A CIRCLE TANGENT TO BOTH A CIRCLE AND A LINEC =L/C...... 23: A CIRCLE TANGENT TO TWO CIRCLES C = C/C.... 0.0... c cece eee 23¢ A CIRCLE PASSING A POINT AND TANGENT TO A LINE C = L/P/R. . . . 23¢ A CIRCLE PASSING A POINT AND TANGENT TO A CIRCLE CH= PICTR 2. cee e ent eee eee es 238 A CIRCLE PASSING TWO POINTS C = P/P... 2... ee ee 24¢ A CIRCLE PASSING THREE POINTS C = P/P/P.. 2... 0... eee eee 242 DAYS BETWEEN DATES. ... 2... 0.0.00 000 2c ee eee ee 244 CALCULATION OF PAST AND FUTURE DATES..................... 24€ CALCULATION OF INTEREST RATE ON LOAN..........0 0.02.00 0008 248 CALCULATION OF INTEREST ON DEPOSITES.................-.40. 25C CALCULATION OF PRESENT VALUE OF COMPOUND-INTEREST ANNUITY... 00.0.0. cc eee 252 CALCULATION OF FUTURE & PRESENT VALUE (by compound interest) 2.0... 2. eee eee 254 INSTALLMENT CALCULATION..........0.0.0 0.000002 ee eee eee ee eae 25€ CALCULATION OF DEPRECIATION ... 2.0.0.0... 00005022 258 CATEGORIZED TOTALIZATION [I]... 0.2... ..00 002020 e eee eee eee 261 CATEGORIZED TOTALIZATION [I].........0.0. 0.00 c eee eee eee 264 RANKING DECISION .. 2.0.0.0. 0000 ce te eee 266 CHANGING OF ORDER P4—I-1 P4—I-2 P4—I-3 P4—I-4 P4—I-5 P4—X—-1 P4—X—2 P4—X-3 P4—X—4 P4—X—5 P4—X-6 P4—X-7 P4—X--8 P4—X-9 P4—X—11 BIORHYTHM. ....0 0.06 eee tenes 271 CALCULATION OF VISCOSITY INDEX OF PETROLEUM PRODUCTS ..... 273 HEAT CONDUCTION OF HETEROSOLID-STRATUM.............-..00. 275 VAN DER WAALS’ EQUATION. ........0 6020s 277 BOILING POINT OF COMPOUND (3 COMPONENTS).............02005 279 CANNON SHOT GAME... 2... 26-0. eee eee 282 BALL ROLLING GAME... 1... 0... ec eee nee 284 REVERSE GAME .. 1.2.0... eee eens 286 MEMORY TEST .. 0... 6. ee eee ee 288 ROCKCLIMBING GAME....... 20.0... 0 2c eee 290 GUESS-NUMBER GAME. ... 0.660. ee eee 292 DRIFTING-AND-SURVIVING GAME....... 000000000 e cece cee eee 294 SOFT-LANDING GAME... 2.6.6. ce ett eee 296 CALENDER CALCULATION ..........-..0. 00.002. 0 00 eae eee 298 TREASURE-HUNTING GAME... 2... 06 eens 300 SHARP . PROGRAM NO. Title SIMULTANEOUS EQUATIONS pA A —1 [ Formula ] This program solves simultaneous equations by sweeping-out method. Express equations in matrices. Av=b, A={aij}, x={xi}, b= {bi} (i, j=I~n) p=amm (m=2~n) Q=aim/p (i=l~m-1) @ij=Qij-q*amy (i=1~m) bi=bi-gtbhm Thus repeating computations, the coefficient of i<j is obtained as ay = 0 Hence, @i1X; =b1, then x; =bi/a, Ay1X1 +422.X2 = by, then x2 = (b2 — a1X1)/a22 [ Example ] (Ex. 1) 2x, —2x,+8x9=2 Bay t2x.~-8x5=9 x) + 5x.—84%3=—-12 When n memories: a-ll=iG+l 7 elements xy= 1.5714 x2——4.9048 Possible up to 9 elements. xX3=—3.6508 (A) program ... data input {S, program ... execute program ... re-display of results of computations [ Operation] CLOADYAIY Input Display Note Input Display Note 1 (A) | ORDER? 11} Cas.) 1 (EATER)| ? 2 [No OF «8 (ENTER)| 2 12] (ay) 5 urea]| ? 3](an) 2 (ENTER\} ? 13] (a3) ~~ S{EWTER)| ? 4|(a) — 2 (ENTER) ? 14] (ds) —12{ENTER)| > 5 | (ar) 3 (ENTER|| 2 15] Execute SC.) 2 EENTER)| 16} (SHFT) (S) Ja = 1.571428571 | x, display VH(ae1) __5 (ENTER}| 9 7 2 -4.904761907 | x» display 8|(az) 2 [ENTER)| 7 18 (uteR|| 3. —8.650798657 | x; display 9|(aza) — 8 (ENTER) ? 19 10/(¢,) 9 (EnTER}| ? 20) . PROGRAM NO. Title SIMULTANEOUS EQUATIONS p4-A-t Memory content 10: "A:INPUT “ORDER ?”;A i] » 20: GOSUB 600 30: B=A:END m 40: "S":GOSUB 570 SQ: D=ACK) :1F D<>0GOTO 160 Address 60: FOR G=1TO B~1 p 70: GOSUB 500 80: D=ACC):IF D<>OGOTO 110 q 90: NEXT G 400: PRINT “NO SOLUTION”: END v 110: FOR H=1T0 6-1 i 120: GOSUB 520 130: ACK) =ACK)+ACC) :NEXT H j 140: GOSUB 540 ols) mi ale lw] rp 150: ACK)=ACK) +A(C) 9} For input 160: FOR G=1T0 B-1 10) Vv 170: GOSUB 500 180: E=A(C)/D:FOR H=1TO B-1 It} v 180: GOSUB 520 2 bs 200: ACC)=ACC)-E*ACK) :NEXT H : 210: GOSUB 540 13 220: ACC)=ACC)-E*ACK) :NEXT G 230: B=B-1:IF B>1GOTO 40 14 After b; 240: FOR B=1TO A-1 15 ; 250: GOSUB 570 260: ACCY=ACC)/ACK) SE=ACC) 16 270: FOR G=8+1TO A 280: GOSUB 550 17 290: ACC)=A(C)-EXACK) 18 300: NEXT G:NEXT B 310: B=A:GOSUB 570 19 320: ACC)=ACC)/ACK) 330: "B":FOR G=1TO A 20 340: GOSUB 550 21 350: I=A(C) 360: PRINT USING "#HH#HH"Z G7" "FUSING ¢1 22 370: NEXT G 2B 330: END 5900: K=A*B+B+11:C=A*G+8+11 24 510: RETURN 520: K=A®B+H+11:C=A*G+H+11 25 30: RETURN N/</<X/El</Cl\H/O/DiO|/ViO;\ZiS/rjiRicl—|Lia|aimioialal> 6 540: K=B+11:C=G+t11:RETURN 550: C=G+11:K=A*G+B+11 560: RETURN 570: C=B+11:K=A*5+C :RETURN 600: C=12:K=A+12 610: FOR G=1T0 A 620: FOR H=1TO A 630: PAUSE USING "Yas!" ZGZH2 INPUT I 640: ACK) =I:K=K+1:NEXT H 650: BEEP 1:INPUT I 660: ACC)=1:C=C+1:NEXT G 670: RETURN 691 —2-— SHARP PROGRAM NO. Title INVERSE MATRIX P4— A~2 [ Formula ] This program determines an inverse matrix by sweeping-out method. A matrix is given: A ={ai;} (i, j=l~n) a,;,—aj,t1 (f=l~n) P=mm—1 (m=1~n) O mj =Amj/b (j=l~n) @jj=4jj—@im @mjy Ci=l~n, ism) Qii=az;—-1 (i=I~n) Asa tesult of computations above, [a,;] is changed to an inverse matrix of the original matrix. [ Example ] 438 2 11— 1-1 0 0 38 2 1 -1 2-1 0 222 1 0-1 2 -1 1rd 0 o-1 2 When memories: Possible up to ~/n —9 elements Possible up to 11 elements. (A) program ... data input (S| program ... execute program ... correction of data [ Operation ] CLOAD YA2Y Input Display Note Input Display Note 1 (A) | ORDER ? 11] When correcting 2](n) 4 wren]? 12 (SHE) 3]Can) 4 (ewten)|? 13] (7) 4\(an) 8 (EaTea)|? 1417) ENTER nr 15) (Seay 6|(an) 1 (enTER)| ? 16 TH(an) SB (ENTER)| 17 8 : i A 18, Execute operation 9} Can) 1 (ENTER) | > 18 sg} fii 1.0000 |(1,1) solution| 10 20 EWTER}| 1 2 1.0000 |(1,2)solution Title PROGRAM NO. INVERSE MATRIX P4—-A-2 Memory content 1 n m Prd z i For input ofa | omia!| ep] wl] rn Address Address 10 aij 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 N/</X/SCIChH/ OID O|/ VO; Si/SirjA/Ci—| LO; AM/O;O|a\ yp 26 10: "A": INPUT “ORDER ?”;A 20: I=10:FOR E=1T0 A 30: FOR F=1TO A 40: PAUSE USING "####";7E;7F:INPUT G SO: ACI)=G:1=1+1 60: NEXT FeNEXT E 70: END 80: "S":FOR B=1TO A 90: GOSUB 500 100: ACH) =ACH) +1 110: NEXT B 120: GOSUB 500 130: D=ACH)-1 140: IF D=OLET PRINT "NO SOLUTION':END 150: GOSUB 600 160: B=B-1 170: IF B>OGOTO 120 180: FOR B=1TO A 190: GOSUS 500 200: ACH) =ACH)-1:NEXT B:BEEP 3 210: "B':I=10:FOR E=1T0 A 220: FOR F=1TO A 230: PRINT USING “#H#A"7ZEFFF7USING “HHHHHE At HH" FACT) 240: I=1+1 250: NEXT F:NEXT E 260: END 270: "F':PAUSE“CORRECT’: INPUT "I= "FE: INPUT “J= "SELINPUT G 280: GOSUB 510 290: ACI)=G:GOTO 270 500: C=B:GOTO 520 510: C=F 520: C=C-A+9?! 530: H=A*B+C: T=AKE+C 540: RETURN 600: FOR F=1TO A 610: GOSUB 510 620: ACH)=ACH) /D:NEXT F 630: FOR E=1TO A 640: IF B=EGOTO 690 650: GOSUB 506 660: D=ACI):FOR F=1TO A 670: GOSUB 516 620: ACI) =ACI)-D*ACH) :NEXT F 690: NEXT E:RETURN 533 SHARP Title DETERMINANT PROGRAM NO. P4—-A-8 [ Formula ] computes the determinant. A matrix is given: {a;;} (i, j=1~n) p=amm (m=2~n) q=aim/p (i=l~m—-1) Qij=Qij;—qramji (j=l~m) Thus calculating, with respect to the element of i</, we obtain This program transforms a matrix into a triangular matrix by sweeping-out method, and ay=0 Hence, det = ay ° ay * a33° ° ann [ Example ] (Ex. 1) (Ex. 2) (Ex. 3) 2 32 2 6 4 7 1 8 =] =~81 58 7 2 5-1 2 -4 =—3276 3 12 -5 6 1 4 7 2 (Note) Max. 10 elements (Al program ... data input (S) program ... execute [F) program ... correction of data [ Operation ] CLOADVA3¥ [ENTER] Input Display Note Input Display Note 1 iy ORDER ? 11] When correcting 2| WoreF gem]? 12] (surt) 3[(am) 2 (enren)| 2 WIP (ENTER 4|(ae) 3 ENTER)]? 14] Gi) (ExT) 5} i : 15 L (Correct value)- ENTER] B}(ain) 3 i 16 Tan) BENE]? W Qi: : : . 18 Execute operation | r) 19 (sift| (5S) {DET 1 (Ex. 1) 10 20 Title DETERMINANT PROGRAM NO P4-A-3 Memory content 1 n 2 m 3 i’ 4 v 5 v 6 t 7 j 8 For input 9 Address 10 Address = = For decision = i=) = wo = a = ~ = co = o p<] =] nn = Lad iy NR wo nN = Lad own Ni</<X/El</ClA Oi Dl O| VO S/Sier | A\cCl-|Liginim\ol|ala|yp = pty o 70: “A™SINPUT “ORDER ? "7A 20: K=O0:GOSUB 608 30: END 40: "S":USING :B=Ar£=1 59: GOSUE 500 60: D=ACI) :IF D=0GOSUB 706 70: IF K=4LET E=O:GOTO 108 SO: E=D*eE:GOSUS SOG 90: B=B-T:1F 2>160TO 50 ! ExXMSPRINT “DET ZEZEND Vids “F'IPAUSE "CORRECT' INPUT “Is "JFe/"s= " Gril 129: GOSUS 519 130: ACJS=SH:GOTO 116 CO: CHG:GOTO 520 ‘wal = oO oy IO Me “AtiZ AXBtC I J=Ae FEC SRETURI =13:FOR F=1TO A:FOR G=1TO A O: PAUSE USING "Hi##";7F,G2INPUT H G20: ACS) =H:J=J49:NEXT GINEXT FrRETURN 7OC: FOR F=1TO 5-1:G60SUS 500 710: D=ACI): IF D<>OGOTO 730 7203 NEXT Frk=1:RETURN 30: FOR G=1TO 8:60SUE S10 7402 ACIDSACIV FACS) tNEXT GIRETURN S09: FOR F=1TO B-1:GOSUB 595 510: LeaCJ)/DIFGR G=1TO b-71:G0SUD 510 S20: ACJV=ACL)-L*ACI) SNEXT Gi NEXT F RETURN 456 fon nen DS) CHAD nou a QO aAnuww = SHARP . PROGRAM NO. Title PRODUCT OF MATRICES p4—-A-4 [ Formula ] This program computes the product C (mn type) of an ml type matrix A and an In type matrix B. : 11 Ge bry Bias bin Cir Cugeeere cin G21 G22 bar Bage ben Cay Cae" Com @m, am, bo, Bfyr bon Cm, Omg" Can 5 cij= Gij* bei ij KA ij bj [ Example } [ 4 0 +1 —1 5 —5 16 —3 3 7 —6 —6 = -8 — 5 -9 2 5 1 4 2 —387 5 ~1 3 4 43 mit+en+mné 144 [ Operation ] CLOADY A4VY Input Display Note Input Display Note 1 iA) | M= 11) G1) — 1 {EATERY 2 2{ Gn) 8 (ENTER)] L= 12]: : E 3}(2)___8 fewteR|| N= 13] Gin) 2. 4)(n) 1 (ewien]| ? 14]: : : 5} (a) 4 (ental) ? 15] (gn) A(ENTER} 1 —3.0000 |(1,1) 6 (iz) 0 (EnTeR]| ? 16 (ENTER) 12 (1,2) 1]: : } 17 i : : 8| (a>,) —8 (EwTER)] ? 18 g] i : : 19 10| (amp) 5 (EWTER)) ? 20 Title PRODUCT OF MATRICES PROGRAM NO. P4~-A-4 Memory content m £ n Input opens i( alan] &) win] = =n i=) = = Input data @,, = R a2 _ w —_ es = wn -_ a After input data _ ~ Output data = a en = wo Ld o nN = <] Le} » w Lad 4 RS on Ni </X/EI< [CHAO Di OVO; SiS[E Ai Ci—(| LTO; AM ola|gl >yS we Co 10: 20: 30: 40: 30: 60: 70: 80: 90: 100: 110: 120: 130: 140: 150: 160: 170: 180: 190: 200: 210: 220: 230: 240: 250: 260: 500: "A™ CLEAR INPUT “M= "ZAr"L= “ZBo"N= "3 FOR F=1T0 A FOR G=1TO B 60SuB 500 E=Ba ( F-1) +6+10 ACE) =p NEXT GeNEXT F FOR F=1T0 B FOR G=1TO C GOSuB 500 E=C&(F-1)+G+AxB+10 ACE)=D:NEXT G:NEXT F FOR F=7T0 A FOR G=170 C E=C* (F~1) +G+B#(A+C) +10 FOR H=1TO B ISBe( Fo) +H+40 J=Ce(H-1) +G+AeB+70 ACE) =ACE) +AC I) #ACJ) NEXT HsNEXT G:NEXT F I=I-2:FOR F=iTO A FOR G=1T0 C =Ce ( F~1) +G+Be (AC) 410 2H=ACE) PRINT USING “#HA#"FFZGFZUSING “HeHHHH AY HE" FH NEXT G:NEXT F:END PAUSE USING “####";F7G: INPUT D 510: RETURN 398 SHARP Title MUTUAL CONVERSION, AND ADDITION AND SUBTRACTION PROGRAM NO. BETWEEN DECIMAL NOTATION AND OTHER NOTATION P4-Aa—5 [ Formula ] Mutual conversion, and addition and subtraction between decimal notation and p-based notation. Program A: conversion from p-based notation into decimal notation Program B: conversion from decimal notation into p-based notation Program C: addition in p-based notation Program X: subtraction in p-based notation Program M: setting of p, and clearing of memory for acumulative total of addition and subtraction { Example ] When p is 7 (Decimal numerals are enclosed in parentheses): (69) 12> 910), 20> 14 (10) (2) 12+ 20+ 156-23 > 165 (all heptal numerals, except 9, 14) (NOTES) 1. When performing addition or subtraction, first set the value of p (operation of program(i). 2. When the base is larger than 10, the display is given in two digits each. 3. Maximum 7 digits can be computed in up to decimal notation, and 5 digits in undecimal and higher notations. When performing addition or subtraction, refer to the example of operation below. [ Operation ] CLOAD VASY Input Display Note Input Display Note 1] (su) BASE ? 11] (sit) (| BASE ? 112 7 (ENTER}| > 12 7 (ENTER ; 13 ©) |DATA= 4| (SF) f) DATA= 14 12 (ENTER) 7 12 i 12 (EwTER) 7 9 Base, value |}15 (ENER} DATA= 6 (en)) DATA= 16 20 (ENTER) 7 82 1 20 (ENTER) 7 14 W DATA= 8 18 156 ENTER) 7 221 g 19) (SFT) =) | DATA= 10 20 23 (ENTER q 165 H MUTUAL CONVERSION, AND ADDITION AND SUBTRACTION | PROGRAM NO. Title BETWEEN DECIMAL NOTATION AND OTHER NOTATION P4—-a-5 Memory content Ail] v Bi2) v 1: GOSUB 5:BEEP 3:PRINT USING “##H#HHHH" ZI C}3i v 7G:RETURN 2: A=B:D=I:E=J :RETURN v DI4 3: INPUT “DATA= "7A E|/5| v 4: E=I:D=J sRETURN 5: C=0:G=0 Fis} v 6: FSAZASINT (F/D) G!7| Answer 7: FEFeAxD:G=INT CESC+.5)*F+G2C=C41 3 8: IF C<>KGOTO 6 H 9: RETURN 113] Base 10: “A':PAUSE USING "#####"717" TO 10" 10 20: GOSUB 3 J v 30: GOSUB 1 K lit) ov 40: GOTO 10 50: "B":PAUSE " 10 TO "ZUSING "#H#"ZI L {12 60: GOSUB 3 M113 70: D=I:E=J:GOSUB 1 80: GOTO 50 N |14 90: “C™:PAUSE USING "H###H#"sI3" 4" 100: GOSUB 3 1 O15 110: GOSUB 5 P \16 120: B=B+G:GOSUB 2 130: GOSUB 1 Q\v 140: GOTO 90 R |18 150: “X":PAUSE USING "#####"71;" —-" $j19 160: GOSUB 3:GOSUB 5 170: B=B-G:GOSUB 2 T j20 180: GOSUB 1:GO0TO 150 ula 190: “"M":B=Q:INPUT “BASE ?”;1 200: IF 10>=ILET J=10:K=10:END V /22 210: J=100:K=5 :END wi 398 X |24 Y {25 Z \26 SHARP ‘ Title MUTUAL CONVERSION BETWEEN RECTANGULAR PROGRAM Nu COORDINATES AND POLAR COORDINATES P4-A-6 { Formula } Rectangular coordinates and polar coordinates are mutually converted in two- and three- dimensional space. When angle designation is DEG, inputs and outputs are made in DEG, when RAD is designated, in RAD. Two-dimensional space: o Rectangular coordinates to polar Whenx =y=0, r=0: 6 = undecided raVxP byt When y 20, 6 =cos! (x/r) ? When y <0, 6 = —cos™! (x/r) o Polar coordinates to rectangular i, =rcosé@ x» P y =rsin@ Three-dimensional space: | o Rectangular coordinates to polar When r=Vx? ty? +2?,x=yp=z=0, 0 xp * r=0: 6,¢: undecided @=sin7! (z/r) When x >0, g = tan™? (y/x) When x = 0, if y>0, p=90° If y <0, y= —90° When x <0, If y>0, v= tan! (y/x) + 180° If y <0, y= tan! (y/x) — 180° Input | Display Note Input Display Note 1! (siFT) Al X= Wo fsut) G) oP X= 2}(x) —1 (enter)! Y= 12/(x) = —1 (ENE) Y= a](y) 8 Cente) 2 120 13l(y) 2 {Eaten} Z= 4 14](z) — ~ 3 (ENTER}) R= 3.741657887 i 15 THETA=-58.80077479 6 16 (enten| PH=. —116.5650512) 1 7 8 18 9 19 10 20 SHARP Title MUTUAL CONVERSION BETWEEN RECTANGULAR COORDINATES AND POLAR COORDINATES PROGRAM NO. P4—A-—6 o Polar coordinates to rectangular x=rcos @ cos y=rcos 6 sin 9 z=rsin @ (A) program ... program ... (C) program ... (D) program ... two-dimensional, rectangular to polar two-dimensional, polar to rectangular three-dimensional, rectangular to polar three-dimensional, polar to rectangular [ Operation ] CLOAD VYA6Y The examples refer to the case of DEG designation. Input Display Note Input Display Note WW 13 14 15 16 17 18 wlml[ajalaleiolr| = 19 20 Title MUTUAL CONVERSION BETWEEN RECTANGULAR PROGRAM NO COORDINATES AND POLAR COORDINATES P4—-A-—6 Memory content olsliamial|e/wlrn] = 10 11 12 13 14 15 16) 17 20 21 22 23 24, x 25] Ni </[X<X/El<iClaloO|/DlO/ vio; Zisir|RX|[cl—(/L/ol/alm/oj/a|/a\y> 28, z 10: 20: 30: 40: 50: 60: "A" sGOSUB 500 R=JCX#X+Y%Y) IF R=OPRINT “R=0 THETA, PHI= ?”: END GOsuB 700 C=ACS (X/R)*A PRINT R/C:END 70: “B":GOSUB 600:Y=R*SIN C 80: 90: 100: 110: 120: 130: 140: 150: 160: 170: 180: 190: 200: 210: 220: 230: 240: 500: 510: 600: 610: 700: 432 PRINT X,Y: END "C":GOSUB 500 INPUT "Z= "42 Ra fCX*X+ YRY+Z*Z) IF R=QGOTO 30 C=ASN (2/R) IF X>QLET F=ATN CY/X):GOTO 180 GOSUB 700 IF X=QLET F=AxACS Q:GOTO 180 F=ATN CY/X)+AxACS ~1 PRINT "R=",R:PRINT “THETA="/C:PRINT "PH I="/F END "D":GOSUB 600 INPUT “PHI= "7F X=X*COS F2Y=Y*SIN FrZ=R*SIN C PRINT "X="/X:PRINT "Yo",Y:PRINT "Z="-Z END INPUT "X= "ZX/"Y= "7Y USING :RETURN INPUT "R= "FRe"THETA= "FC USING :X=R*COS C:Y=R*COS C:RETURN A=(Y=0)+SGN Y:RETURN SHARP Title ROOT DETERMINING CALCULATION ACCORDING PROGRAM NO. TO NEWTON’S METHOD P4~A-7 [ Formula ] Determine a root of a function according to Newton’s method. Label = 2: —f han) ? . " t'Cen) When the absolute value of the difference between x, and x,4, becomes less than 10-®, x,, is regarded as a root, and computation is terminated. ° \/* % * Here, f(x) of linear differential is defined as follows: fixj= LCA) tla} (A: minor section) h When changing 10-®, vary E-8 in line 60. [ Example ] 3 = = w— 2x7—xt+2=0 If error message is displayed in the process of operation, change xo, A, and retry. Suppose, Xo =3 h= 1074 ‘ then, x =2 Write the function, as subroutine, after line 500. Method of writing (in the case of example above): Set to PRO mode (by pressing proper key). 500B=( (X—-2)*X—-1 )*X+2 510RETURN This ends writing. Next, change to DEF mode, and execute. [ Operation ] CLOAD YA7Y Input Display Note Input Display Note 1] (siti | xo= 11 2i(xo) 8 H= 12 3 (A) 0.0001 ANS. 2 13 4 4 5 15 6 16 7 7 8 18 3 19 10 20 ROOT DETERMINING CALCULATION ACCORDING PROGRAM NO. Title — To NEWTON'S METHOD P4-a—7 Memory content Ali; # Bij2| fi 10: "AN :INPUT "XO= "ZC/"HS "ZA C}3) % 20: X=C:GOSUB 500 fCxth) 30: Y=B:X=A+C Daj fs 40: GOSUB 500 E/5 50: D=C:C=D-A*xY/ (BY) FIs 60: IF ABS (D-C)>=E-8G0TO 20 70: BEEP 3:PRINT "ANS."-C G7 80: END 500: BHC (X-2)*X-1) X42 H/8 510: RETURN I]}3 134 J 10 K }i1 Function (An example containing the following) L 12 f= (Cx-2)x—-1) x42 M {13 = 9-2 x? -x42 N [14 O15 P |16 Q]17 R |18 S }19 T 20 U /21 V {22 W /23 X }24) x Y (25) fla Z |26 SHARP Title QUADRATIC EQUATION P4-A~-8 [ Formula ] Determine the roots of a quadratic equation ax? + bx +c=0 (a¥0). _ abtv/b*-4ac 2a x 1) When b?—4ac > 0, the roots are 3) When b?—4ac <0, the roots are PROGRAM NO. real roots: imaginary roots: x= ~btvb4ac Rear part: =b Qa 2a Jf 4 —h2 2) When b?—4ac =O, the roots are Imaginary part: ae a equal roots: x= b 2a [ Example ] (1) 4x°-x-1=0 Two real roots: x = 0.64----, —0.39 + (2) 5x +4x4+1=50 Imaginary roots: real part, —0.4; imaginary part, 0.2 (NOTE) In the case of two real roots, REAL and x,,x2 are printed. In the case of equal root, EQUAL and x, are printed. In the case of imaginary roots, **REAL**, IMAGINARY , and real part and imaginary part are printed. [ Operation ] CLOADY A8~ (EaTER} Input Display Note Input Display Note 1) (ser) [Al A= 14) (sft) (A) a= | 2 |(a) 4 (EATER!) B= — |talea) 5 (ENTER)| B= 3}(o) = 1 C= 13](6) A (ENTER) | C= 4\(c) 1 (ENWTER\] REAL 6.40888 E -01 14/(e) 1 (ewTER| |. **REAL** = —04 5 | luter | REAL —3.90388 E~01 15 (NER]] IMAGINARY 0.2 le 16 7 | 17! Real part of imaginary root is displayed in **REAL**, 8 18 9 19 110) 20 —16— . PROGRAM NO. Title QUADRATIC EQUATION P4—-A-8 Memory content b, ~8/(2a) 10: “"A™:INPUT "A= "ZAs"B= "ZB,"C= "FC ° 20: B=-B/2/A D 30: D=BxB-C/A 40: IF D=0GOTO 100 50: IF D>OGOTO 120 60: Y=A-D) 70: PRINT "x*REAL¥*"7B 80: PRINT "IMAGINARY" +Y 90: END 190: PRINT “EQUAL”, B welalamiajemlolrn| = 110: END 120: PRINT "REAL" /B+fD 10 130: PRINT "REAL" ,B-JD 11 140: END 174 = R = wo = or = ~ = o x iJ Ey = [<y NR nN wo EXy > [pty nn Ni} </</S/</C/4/O/D/O/ViO/ZiSirjpxRicl—| Lio; ajmiolajalyp rs i a SHARP PROGRAM NO. Title EQUATION OF THIRD DEGREE P4—-A_-9 [ Formula ] This program solves a cubic equation by Cardan’s solution. Ax+Bx?+Cx+D=0 (where A #0, each coefficient being a real number.) The following equation is obtained by dividing every coefficient by A. tax’tbxte=0 If the second order term is eliminated by the conversion x = y — 4 3 3 y+8 py+ g=0 ba ab, Bat Pegtg tae gt or If y islet to equal u+v, the above equation y° +3py+q=0 — is: w+ v+8u0(utv)+8p(utv)+q=0 Here, if u? +v* islet to equal —g, uv =—p. w+ v=—q This reveals that u? and v® are the roots of the quadratic equation ¢? + qt — p® =0. That is to say, B= bg + VTE) 1 v= 2 (—q-Vq?+4 p*) Hence, the roots of the equation y? +3pyt+tq=0, a, B, and 7, are as follows: a=uto B= 4 wt; Cu-v) Input Display Note Input Display Note 1] (st) @) | a= u 2a) 1 B= 12 3 |(B) 1 C= 13 4\(C) ~2 D= 14 5|(D) -~2 (EWTER)|REAL ROOT 141421356! 15 6 —1.414213562 —9.99999 E—01 16 7 7 8 18 9 19 10 20 SHARP PROGRAM NO. Title |§ EQUATION OF THIRD DEGREE P4-A-9 { ray (ute) “3 i(u-v) The equation above is divided into the real part and the imaginary part. D If gq? +4p? >0 Since u? and v® are real numbers, uw and v are supposed to take the real cubic roots of u® and v*, and the equation above may be used directly. This is the case of one real root and two imaginary roots. IDIf q? + 4p? <0, uv? and v® yield imaginary roots. Suppose u? =re!? v= re 0 aaae Then, “= V=Biloos $+ i sing ) v = V—plcos a4 i sing ) Accordingly, the foots a, 8, Y of y3+3py+q=0 are: = 2 VF sini Z 2 a=2v Psin( 5 3? _ —.: xz, o B —2v—psin( ete) -—2.ssin( Z—2 y=-2v psin( & 3° These roots are all different real numbers. Input Display Note Input Display Note wele[ajolafelsolrwo]— a SHARP Title EQUATION OF THIRD DEGREE PROGRAM NO. P4—-A-9 Hence, u=v= 3 /-4 ence, u=vU 2 So, a=2u B=ro~u a=p=yY= 0. This is the case of triple roots. equation may be obtained. considered. [ Operation ] CLOADY A9Y IID If g?+4p? =0 and p#0, then u? =v? =— The roots are equal roots and a different real root. 4 2 IV) If q2+4p? =O and p=0, then gq=0. From u=v=0, we obtain Finally, by adding + to a,8,, respectively, the solutions of the original Meanwhile, two different roots (or three roots) which are very close to each other may be judged as equal roots. Or, a reverse case to this may be also Input Display Note Input Display Note 1 "1 2 12 3 13 4 14 5 15 6 16 7 17 8 18 9 19 10 20 Title PROGRAM NO. EQUATION OF THIRD DEGREE p4—a-9 Memory content 1 Vv Vv Vv A FOR sentence B Cc D wlolm| aja] me] wl rw 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Ni</x</Sl<(/Cl/4a4in/DioO/Vlo;/Ziz(rjpR[cj—i(LloO|/mimiol/ajin|> 26 40: “AVLINPUT “A= "ZD,"Be "FF e"C= "7G/"D= 7H 20: FOR E=6TO & 3O: ACE) =ACE)/DSNEXT E 40: F=F/3 50: D=G/3-FeF 60: E=sH=-F*Gt2% Fe FRE 70: C=4eDeDeD+ERE 80: IF £-8>ABS CGOTO 270 90: IF C>GGOTO 200 100: A=2* (=D) 110: B=ACS CE/C2eDeT(-D))) /3 120: D=ASN 1T:E=ASN .5 130: G=A*SIN (D=-B) :H=<A*xSIN (E+B) 140: Is-A*SIN (CE~B) 150: FOR C=7T0 9 160: ACCI=ACCI-FINEXT C 170: BEEP 3:PRINT "REAL ROOT",ZG 980: PRINT HeI 490: END 200: C=FCrA=.5*(C-£) :Ba-.5e(C+E) C=1/3 210: A=ABS A*CXSGN A 220: B=ABS B*C*SGN B:C= 5403 230: BEEP 3:PRINT "xREAL ROOTe"/A+B-F 240: PRINT "*REALK"-—.5% CA+B) —F 250: PRINT "IMAGINARY" sCeASS CA-B) 260: END 27C: BEEP S:IF E-G>ABS, DPRINT "TRIPPLE"s-F: END 280: As-ABS (.5*E)*(1/3)*SGN E 290: PRINT "REAL ROOT" -2kAWF 300: PRINT “EQUAL ROOT",-A-F 310: END 5390 SHARP PROGRAM NO. Title EQUATION OF FOURTH DEGREE p4—A-10 [ Formula ] This program solves an equation of fourth degree by using Ferrari’s theorem. Given Ax*+Ba5+Cx?+Dx+E=0 Dividing each term by A yields ta ttaxrtaxrta=0 Suppose x = y ~ 4h then it follows yit ky’ +eyim=0 Coefficients k, l,m are 3 Rk Sm gar t ae 1 1 b= gar ga ae +a 3 1 1 ma=— 356 7 + ié ay a2 — 7a as +a Attempt to reqrite the equation of fourth degree in terms of y, y* + ky? +ly+m, in the form of difference of squares, for instance, This expression may be developed into Hunn) 4 2owyt (our) Comparing this with the equation above, we obtain uw u-v=k, 2vw=2, zw m Hence, v =u ~ k is obtained from the first equation, and w = 1/(2(u — k)) from the second equation. Substitution into the third equation yields Input Display Note Input Display Note 1 (a) A= 1 PCa) 1 (eaten) | B= 2 3B) 1 C= 13 fal) 3 D= 4 ls | 1 E= 15 ne 2 (ENTER) 2 0 16 1 1 0 17 8 -1 0 18 9 (ENTER) -1 0 19 10 Real Imaginary 20 SHARP PROGRAM NO. follows: u— ku’—4mut+(4km—*) =0 That is, by solving or, 24 Sgok wu _£ ye Ptvurk ytCs Vuze 0 u £ = yo Surk yt Sta ze = x will be determined. [ Example ] xt— 8-8 x? +r4+2=0 Answer: 2, 1, —], ~1 [ Operation ] CLOAD Va 10V (ENTER) Cyto yt 5 Vow) Cee gt Gt ve w= 0 Title EQUATION OF FOURTH DEGREE P 4—A—10 a 4 4Cu-k) ™ By rearranging this, an equation of third degree in terms of u may be obtained as Regarding u as one roof of this equation, it is substituted in eq. (1) and supposed as 0. Input Display Note Input Display Note 1 "1 2 12 3 13 4 14 5 15 6 16 1 7 8 18 9 19 10 20 Title PROGRAM NO. EQUATION OF FOURTH DEGREE P4-A—10 Memory content ops mia} elwl rn] = = o = _ — nO = wo = > _ on ay a = ~~ _ o = o nm o Le] = Led Nn nN wo xd > nn on N/</X/El</C)A/O/ D/O; VO;/S Sir Xi ci—|LTiOl/nlmiojal\ai> R a 10: 20: 30: 40: 50: 60: 70: 80: 90: 100: 110: 120: 130: 140; 150: 160: 170: 180: 190: 200: 216: 220: 230: 240: 250: 260: 270: 280: 290: 300: 310: 320: 330: 340: 350: 360: 370: SC: 390: 400: 410: 420; 430: 440: 450: 460: 470: “AN SINPUT “AS "SX-"B= "3G"C= "GH-"DS FI/"E= "3S FOR Y=7TO 10 ACY) =ACY) /X:NEXT Y G=G/4:F=GeG J=Gx (FeH-3* Fe F-GeI+J) I=8%F*G-2*G*H+1 H=(H~6%F) /3 A=3*HxJ-I*I Ba~-J/3-H*H C=A-H&S-2*HeH*H Y=4*B*xBxB+CxC IF Y>=QGOTO 160 YEACS (C/(2*Bx/(-B) ))/3 X=2%f/(-B)*SIN CASN 1-Y) +H GOTO 180 Y=/Y¥:A=.5*(Y-C) :B=.5%(-C-Y) X=ABS AA(1/3)*SGN AtABS BA(1/3)*SGN Bt Y=3xH 2 A=-X-Y F=fABS (X-Y) B=2eI/F:C=F/2 IF Y>XGOTO 340 K=O X=C-G:Y=(A-B) /4 IF Y>=QG0TO 300 Y=fABS Y BEEP 3:PRINT X-Y PRINT X--Y IF K=1END K=1:B=-B:C==C:GOTO 230 BEEP 3:Y=/Y:PRINT C+Y-G-9 PRINT C-Y-G,0 IF K=1END GOTO 290 B= {CA*A+B*B) X= [C.5* CAtB) )/2 Y=JC.5*(B-A))/2 BEEP 3:1F I>=GGOTO 430 PRINT X-GeC~¥ PRINT X-GrY-C PRINT -X-G-C+Y PRINT -X-G,-C-Y END PRINT X-GrC+Y PRINT X=G,r-C-Y PRINT -X-G-C-Y PRINT -X-G,Y-C END 684 SHARP Title APPROXIMATE DEFINITE INTEGRAL BY SIMPSON’S METHOD PROGRAM NO. P4—-A-—I1 [ Formula ] Compute a definite integral by using Simpson’s rule. S= S72? fla)dx= EC vot ep) +40 tyeto + wed 0 +2 C yet ter t+ yep-2)) h= Laue) p: number of divisions Pp [ Example ] y = 8-222 —-xt2 = ( (4-2) x-1) et 2 Lax = 8 Sry dx = 12 mms Write in the function, as subroutine, after line 500. How to write in (in the case of example above): Set to PRO mode (by pressing proper key). 500 Y=( (x-2)*x-1)*xt2 510 RETURN This ends writing. Next, change to DEF mode, and execute. [ Operation ] CLOAD YAI1Y Input Display Note Input Display Note (A, | X0= iW (x0) 0 X2P= 12 (op) 1 P= 13 (p) 20 [ENTER)} ANS. 1,083333333 14 eloelajoafalealefr|] = a Title APPROXIMATE DEFINITE INTEGRAL BY PROGRAM NO. SIMPSON’S METHOD P4—-A-Il Memory content a A s Xo Xap ololsl[omi|a|le!} win] = =—f/=— =—|o _ Nn = wo = > _ oo a a _ ~~ = o = o nn o Nn = n n nN wo n = nN on Ni<|/X/El<[ClHiO/ DO VO\Z/S[r[aAi\cl—|LTJO| al mM/ol/a|o\> ny 2 10: “A'SINPUT “XO= "7D,/"X2P= "ZE,"P= "FF 20: B=(E=-D)/2/F 30: A=0:X=D:GOSUB S00 40: A=Y+A:X=X+B:GOSUB 500 50: A=¥*4+A:X=X+B:GOSUB 500 60: A=Y+tA:F=F-1 70: IF F<>0GOTO 40 80: C=A*B/3 90: BEEP 3:PRINT "ANS."-C 100: END 500: Y=C(X-2)*X-1) *X+2 510: RETURN 180 An example containing: y= ((x-2) 2-1) xt 2 = 8-22? —-x+2 SHARP Title FIRST ORDER DIFFERENTIAL EQUATION p4—A~12 PROGRAM NO. [ Formula ] This program is to solve a first order differential equation according to Runge-Kutta-Gill method. The equation is y' = f(x,y), anda the initial condition is (x9, yo). Taking the value of x at intervals of h, tn=xXotnh (n=1,2, 00 ) the value of y at x,, namely y,, is obtained sequentially. The formula to obtain X441,Vn+1 from x,, Yn is given as follows according to Runge-Kutta-Gill method. Ro=hf (xn, yn) r= (172) (ho 2q0) ID= yn try 1 =Go+8r1—( 1/2) ko ki =hf (rnth/2, yl) r= I-VWi2) (ka) y= +r, aan t8re—(I-V1 72) ky he = hf (xa th2, yl?) ry= (1+W12) (he — a2) y= yl)-+75 3 =Get+8r3-—Ct+WA2) ke ks = hf Canti, yl8)) re= (16) (ks—2 3) yati = ¥@+7, Qe=gat8r—C12)ks Thus, yn+1 is determined from yy. Here, n= 0, 1, 2, +--+ The value of qo is Oat start point x9,and qq is taken asnew qo thereafter. * As for the function, refer to the Programming list. [ Example ] Equation y’ = —xy is solved, under the initial condition of x» =0, provided yo = 10. However, suppose h = 0.01, and y is obtained when x = 0.01, 0.02,---. [ Operation ] CLOADYA12V Input Display Note Input Display Note 1} (SHFT) (A) X0= 1 21 (xo) OO (ENTER}, YO= 12 31 (yo) 10 (ENTER}} -H= 13 41 (h) 0.01 (ENTER 0.01 9.999500012 14 5 EWTER! 0.02 9, 9980002 15 6 0.08 9.995501013 16 7 EnTen}| 0.04 9.9920082 7 8 18 9 19 10 20 Title FIRST ORDER DIFFERENTIAL EQUATION PROGRAM NO. P4-A-12 Memory content 1 14+-V1/2 1 fie fxy,y) wlofmar| am] o| m/w] nr = i) = = _ R _ wo = an = a = ~~