From e1a751442de8e4b5978335236d207ed130af4c12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Rustad?= Date: Fri, 30 Sep 2011 15:17:58 +0200 Subject: [PATCH] Newtsteep --- backup.eps | 2867 ++++++++++++++++++++++++++++++++++++++++++++++++++ main.py | 2 +- newtsteep.py | 25 + rapport.tex | 11 +- steepest.eps | 274 +++-- 5 files changed, 3021 insertions(+), 158 deletions(-) create mode 100644 backup.eps create mode 100644 newtsteep.py diff --git a/backup.eps b/backup.eps new file mode 100644 index 0000000..bae093b --- /dev/null +++ b/backup.eps @@ -0,0 +1,2867 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Title: steepest.eps +%%Creator: matplotlib version 0.99.3, http://matplotlib.sourceforge.net/ +%%CreationDate: Fri Sep 30 11:50:53 2011 +%%Orientation: portrait +%%BoundingBox: -307 103 919 688 +%%EndComments +%%BeginProlog +/mpldict 8 dict def +mpldict begin +/m { moveto } bind def +/l { lineto } bind def +/r { rlineto } bind def +/c { curveto } bind def +/cl { closepath } bind def +/box { +m +1 index 0 r +0 exch r +neg 0 r +cl +} bind def +/clipbox { +box +clip +newpath +} bind def +%!PS-Adobe-3.0 Resource-Font +%%Title: DejaVu Sans +%%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain +%%Creator: Converted from TrueType by PPR +25 dict begin +/_d{bind def}bind def +/_m{moveto}_d +/_l{lineto}_d +/_cl{closepath eofill}_d +/_c{curveto}_d +/_sc{7 -1 roll{setcachedevice}{pop pop pop pop pop pop}ifelse}_d +/_e{exec}_d +/FontName /DejaVuSans def +/PaintType 0 def +/FontMatrix[.001 0 0 .001 0 0]def +/FontBBox[-1020 -414 1681 1167]def +/FontType 3 def +/Encoding StandardEncoding def +/FontInfo 10 dict dup begin +/FamilyName (DejaVu Sans) def +/FullName (DejaVu Sans) def +/Notice (Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. DejaVu changes are in public domain ) def +/Weight (Book) def +/Version (Version 2.31) def +/ItalicAngle 0.0 def +/isFixedPitch false def +/UnderlinePosition -130 def +/UnderlineThickness 90 def +end readonly def +/CharStrings 41 dict dup begin +/space{318 0 0 0 0 0 _sc +}_d +/parenleft{390 0 86 -131 310 759 _sc +310 759 _m +266 683 234 609 213 536 _c +191 463 181 389 181 314 _c +181 238 191 164 213 91 _c +234 17 266 -56 310 -131 _c +232 -131 _l +183 -54 146 20 122 94 _c +98 168 86 241 86 314 _c +86 386 98 459 122 533 _c +146 607 182 682 232 759 _c +310 759 _l +_cl}_d +/parenright{390 0 80 -131 304 759 _sc +80 759 _m +158 759 _l +206 682 243 607 267 533 _c +291 459 304 386 304 314 _c +304 241 291 168 267 94 _c +243 20 206 -54 158 -131 _c +80 -131 _l +123 -56 155 17 177 91 _c +198 164 209 238 209 314 _c +209 389 198 463 177 536 _c +155 609 123 683 80 759 _c +_cl}_d +/comma{318 0 77 -115 220 124 _sc +117 124 _m +220 124 _l +220 40 _l +140 -115 _l +77 -115 _l +117 40 _l +117 124 _l +_cl}_d +/hyphen{361 0 49 234 312 314 _sc +49 314 _m +312 314 _l +312 234 _l +49 234 _l +49 314 _l +_cl}_d +/period{318 0 107 0 210 124 _sc +107 124 _m +210 124 _l +210 0 _l +107 0 _l +107 124 _l +_cl}_d +/zero{636 0 66 -13 570 742 _sc +318 664 _m +267 664 229 639 203 589 _c +177 539 165 464 165 364 _c +165 264 177 189 203 139 _c +229 89 267 64 318 64 _c +369 64 407 89 433 139 _c +458 189 471 264 471 364 _c +471 464 458 539 433 589 _c +407 639 369 664 318 664 _c +318 742 _m +399 742 461 709 505 645 _c +548 580 570 486 570 364 _c +570 241 548 147 505 83 _c +461 19 399 -13 318 -13 _c +236 -13 173 19 130 83 _c +87 147 66 241 66 364 _c +66 486 87 580 130 645 _c +173 709 236 742 318 742 _c +_cl}_d +/one{636 0 110 0 544 729 _sc +124 83 _m +285 83 _l +285 639 _l +110 604 _l +110 694 _l +284 729 _l +383 729 _l +383 83 _l +544 83 _l +544 0 _l +124 0 _l +124 83 _l +_cl}_d +/two{{636 0 73 0 536 742 _sc +192 83 _m +536 83 _l +536 0 _l +73 0 _l +73 83 _l +110 121 161 173 226 239 _c +290 304 331 346 348 365 _c +380 400 402 430 414 455 _c +426 479 433 504 433 528 _c +433 566 419 598 392 622 _c +365 646 330 659 286 659 _c +255 659 222 653 188 643 _c +154 632 117 616 78 594 _c +78 694 _l +118 710 155 722 189 730 _c +223 738 255 742 284 742 _c +359 742 419 723 464 685 _c +509 647 532 597 532 534 _c +532 504 526 475 515 449 _c +504 422 484 390 454 354 _c +446 344 420 317 376 272 _c +332 227 271 164 192 83 _c +_cl}_e}_d +/three{{636 0 76 -13 556 742 _sc +406 393 _m +453 383 490 362 516 330 _c +542 298 556 258 556 212 _c +556 140 531 84 482 45 _c +432 6 362 -13 271 -13 _c +240 -13 208 -10 176 -4 _c +144 1 110 10 76 22 _c +76 117 _l +103 101 133 89 166 81 _c +198 73 232 69 268 69 _c +330 69 377 81 409 105 _c +441 129 458 165 458 212 _c +458 254 443 288 413 312 _c +383 336 341 349 287 349 _c +202 349 _l +202 430 _l +291 430 _l +339 430 376 439 402 459 _c +428 478 441 506 441 543 _c +441 580 427 609 401 629 _c +374 649 336 659 287 659 _c +260 659 231 656 200 650 _c +169 644 135 635 98 623 _c +98 711 _l +135 721 170 729 203 734 _c +235 739 266 742 296 742 _c +}_e{370 742 429 725 473 691 _c +517 657 539 611 539 553 _c +539 513 527 479 504 451 _c +481 423 448 403 406 393 _c +_cl}_e}_d +/four{636 0 49 0 580 729 _sc +378 643 _m +129 254 _l +378 254 _l +378 643 _l +352 729 _m +476 729 _l +476 254 _l +580 254 _l +580 172 _l +476 172 _l +476 0 _l +378 0 _l +378 172 _l +49 172 _l +49 267 _l +352 729 _l +_cl}_d +/five{{636 0 77 -13 549 729 _sc +108 729 _m +495 729 _l +495 646 _l +198 646 _l +198 467 _l +212 472 227 476 241 478 _c +255 480 270 482 284 482 _c +365 482 429 459 477 415 _c +525 370 549 310 549 234 _c +549 155 524 94 475 51 _c +426 8 357 -13 269 -13 _c +238 -13 207 -10 175 -6 _c +143 -1 111 6 77 17 _c +77 116 _l +106 100 136 88 168 80 _c +199 72 232 69 267 69 _c +323 69 368 83 401 113 _c +433 143 450 183 450 234 _c +450 284 433 324 401 354 _c +368 384 323 399 267 399 _c +241 399 214 396 188 390 _c +162 384 135 375 108 363 _c +108 729 _l +_cl}_e}_d +/equal{838 0 106 172 732 454 _sc +106 454 _m +732 454 _l +732 372 _l +106 372 _l +106 454 _l +106 255 _m +732 255 _l +732 172 _l +106 172 _l +106 255 _l +_cl}_d +/F{575 0 98 0 517 729 _sc +98 729 _m +517 729 _l +517 646 _l +197 646 _l +197 431 _l +486 431 _l +486 348 _l +197 348 _l +197 0 _l +98 0 _l +98 729 _l +_cl}_d +/I{295 0 98 0 197 729 _sc +98 729 _m +197 729 _l +197 0 _l +98 0 _l +98 729 _l +_cl}_d +/N{748 0 98 0 650 729 _sc +98 729 _m +231 729 _l +554 119 _l +554 729 _l +650 729 _l +650 0 _l +517 0 _l +194 610 _l +194 0 _l +98 0 _l +98 729 _l +_cl}_d +/O{787 0 56 -13 731 742 _sc +394 662 _m +322 662 265 635 223 582 _c +181 528 160 456 160 364 _c +160 272 181 199 223 146 _c +265 92 322 66 394 66 _c +465 66 522 92 564 146 _c +606 199 627 272 627 364 _c +627 456 606 528 564 582 _c +522 635 465 662 394 662 _c +394 742 _m +496 742 577 707 639 639 _c +700 571 731 479 731 364 _c +731 248 700 157 639 89 _c +577 21 496 -13 394 -13 _c +291 -13 209 21 148 89 _c +86 157 56 248 56 364 _c +56 479 86 571 148 639 _c +209 707 291 742 394 742 _c +_cl}_d +/R{{695 0 98 0 666 729 _sc +444 342 _m +465 334 486 319 506 296 _c +526 272 546 240 566 199 _c +666 0 _l +560 0 _l +467 187 _l +443 235 419 268 397 284 _c +374 300 343 308 304 308 _c +197 308 _l +197 0 _l +98 0 _l +98 729 _l +321 729 _l +404 729 466 711 507 677 _c +548 642 569 589 569 519 _c +569 473 558 434 537 404 _c +515 374 484 353 444 342 _c +197 648 _m +197 389 _l +321 389 _l +368 389 404 400 428 422 _c +452 444 465 476 465 519 _c +465 561 452 593 428 615 _c +404 637 368 648 321 648 _c +197 648 _l +_cl}_e}_d +/S{{635 0 66 -13 579 742 _sc +535 705 _m +535 609 _l +497 627 462 640 429 649 _c +395 657 363 662 333 662 _c +279 662 237 651 208 631 _c +179 610 165 580 165 542 _c +165 510 174 485 194 469 _c +213 452 250 439 304 429 _c +364 417 _l +437 403 491 378 526 343 _c +561 307 579 260 579 201 _c +579 130 555 77 508 41 _c +460 5 391 -13 300 -13 _c +265 -13 228 -9 189 -2 _c +150 5 110 16 69 32 _c +69 134 _l +109 111 148 94 186 83 _c +224 71 262 66 300 66 _c +356 66 399 77 430 99 _c +460 121 476 152 476 194 _c +476 230 465 258 443 278 _c +421 298 385 313 335 323 _c +275 335 _l +201 349 148 372 115 404 _c +82 435 66 478 66 534 _c +66 598 88 649 134 686 _c +179 723 242 742 322 742 _c +}_e{356 742 390 739 426 733 _c +461 727 497 717 535 705 _c +_cl}_e}_d +/a{{613 0 60 -13 522 560 _sc +343 275 _m +270 275 220 266 192 250 _c +164 233 150 205 150 165 _c +150 133 160 107 181 89 _c +202 70 231 61 267 61 _c +317 61 357 78 387 114 _c +417 149 432 196 432 255 _c +432 275 _l +343 275 _l +522 312 _m +522 0 _l +432 0 _l +432 83 _l +411 49 385 25 355 10 _c +325 -5 287 -13 243 -13 _c +187 -13 142 2 109 33 _c +76 64 60 106 60 159 _c +60 220 80 266 122 298 _c +163 329 224 345 306 345 _c +432 345 _l +432 354 _l +432 395 418 427 391 450 _c +364 472 326 484 277 484 _c +245 484 215 480 185 472 _c +155 464 127 453 100 439 _c +100 522 _l +}_e{132 534 164 544 195 550 _c +226 556 256 560 286 560 _c +365 560 424 539 463 498 _c +502 457 522 395 522 312 _c +_cl}_e}_d +/c{{550 0 55 -13 488 560 _sc +488 526 _m +488 442 _l +462 456 437 466 411 473 _c +385 480 360 484 334 484 _c +276 484 230 465 198 428 _c +166 391 150 339 150 273 _c +150 206 166 154 198 117 _c +230 80 276 62 334 62 _c +360 62 385 65 411 72 _c +437 79 462 90 488 104 _c +488 21 _l +462 9 436 0 410 -5 _c +383 -10 354 -13 324 -13 _c +242 -13 176 12 128 64 _c +79 115 55 185 55 273 _c +55 362 79 432 128 483 _c +177 534 244 560 330 560 _c +358 560 385 557 411 551 _c +437 545 463 537 488 526 _c +_cl}_e}_d +/d{{635 0 55 -13 544 760 _sc +454 464 _m +454 760 _l +544 760 _l +544 0 _l +454 0 _l +454 82 _l +435 49 411 25 382 10 _c +353 -5 319 -13 279 -13 _c +213 -13 159 13 117 65 _c +75 117 55 187 55 273 _c +55 359 75 428 117 481 _c +159 533 213 560 279 560 _c +319 560 353 552 382 536 _c +411 520 435 496 454 464 _c +148 273 _m +148 207 161 155 188 117 _c +215 79 253 61 301 61 _c +348 61 385 79 413 117 _c +440 155 454 207 454 273 _c +454 339 440 390 413 428 _c +385 466 348 485 301 485 _c +253 485 215 466 188 428 _c +161 390 148 339 148 273 _c +_cl}_e}_d +/e{{615 0 55 -13 562 560 _sc +562 296 _m +562 252 _l +149 252 _l +153 190 171 142 205 110 _c +238 78 284 62 344 62 _c +378 62 412 66 444 74 _c +476 82 509 95 541 113 _c +541 28 _l +509 14 476 3 442 -3 _c +408 -9 373 -13 339 -13 _c +251 -13 182 12 131 62 _c +80 112 55 181 55 268 _c +55 357 79 428 127 481 _c +175 533 241 560 323 560 _c +397 560 455 536 498 489 _c +540 441 562 377 562 296 _c +472 322 _m +471 371 457 410 431 440 _c +404 469 368 484 324 484 _c +274 484 234 469 204 441 _c +174 413 156 373 152 322 _c +472 322 _l +_cl}_e}_d +/f{352 0 23 0 371 760 _sc +371 760 _m +371 685 _l +285 685 _l +253 685 230 678 218 665 _c +205 652 199 629 199 595 _c +199 547 _l +347 547 _l +347 477 _l +199 477 _l +199 0 _l +109 0 _l +109 477 _l +23 477 _l +23 547 _l +109 547 _l +109 585 _l +109 645 123 690 151 718 _c +179 746 224 760 286 760 _c +371 760 _l +_cl}_d +/g{{635 0 55 -207 544 560 _sc +454 280 _m +454 344 440 395 414 431 _c +387 467 349 485 301 485 _c +253 485 215 467 188 431 _c +161 395 148 344 148 280 _c +148 215 161 165 188 129 _c +215 93 253 75 301 75 _c +349 75 387 93 414 129 _c +440 165 454 215 454 280 _c +544 68 _m +544 -24 523 -93 482 -139 _c +440 -184 377 -207 292 -207 _c +260 -207 231 -204 203 -200 _c +175 -195 147 -188 121 -178 _c +121 -91 _l +147 -105 173 -115 199 -122 _c +225 -129 251 -133 278 -133 _c +336 -133 380 -117 410 -87 _c +439 -56 454 -10 454 52 _c +454 96 _l +435 64 411 40 382 24 _c +353 8 319 0 279 0 _c +211 0 157 25 116 76 _c +75 127 55 195 55 280 _c +55 364 75 432 116 483 _c +157 534 211 560 279 560 _c +}_e{319 560 353 552 382 536 _c +411 520 435 496 454 464 _c +454 547 _l +544 547 _l +544 68 _l +_cl}_e}_d +/h{634 0 91 0 549 760 _sc +549 330 _m +549 0 _l +459 0 _l +459 327 _l +459 379 448 417 428 443 _c +408 469 378 482 338 482 _c +289 482 251 466 223 435 _c +195 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 760 _l +181 760 _l +181 462 _l +202 494 227 519 257 535 _c +286 551 320 560 358 560 _c +420 560 468 540 500 501 _c +532 462 549 405 549 330 _c +_cl}_d +/i{278 0 94 0 184 760 _sc +94 547 _m +184 547 _l +184 0 _l +94 0 _l +94 547 _l +94 760 _m +184 760 _l +184 646 _l +94 646 _l +94 760 _l +_cl}_d +/l{278 0 94 0 184 760 _sc +94 760 _m +184 760 _l +184 0 _l +94 0 _l +94 760 _l +_cl}_d +/m{{974 0 91 0 889 560 _sc +520 442 _m +542 482 569 511 600 531 _c +631 550 668 560 711 560 _c +767 560 811 540 842 500 _c +873 460 889 403 889 330 _c +889 0 _l +799 0 _l +799 327 _l +799 379 789 418 771 444 _c +752 469 724 482 686 482 _c +639 482 602 466 575 435 _c +548 404 535 362 535 309 _c +535 0 _l +445 0 _l +445 327 _l +445 379 435 418 417 444 _c +398 469 369 482 331 482 _c +285 482 248 466 221 435 _c +194 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +201 495 226 520 255 536 _c +283 552 317 560 357 560 _c +397 560 430 550 458 530 _c +486 510 506 480 520 442 _c +}_e{_cl}_e}_d +/n{634 0 91 0 549 560 _sc +549 330 _m +549 0 _l +459 0 _l +459 327 _l +459 379 448 417 428 443 _c +408 469 378 482 338 482 _c +289 482 251 466 223 435 _c +195 404 181 362 181 309 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +202 494 227 519 257 535 _c +286 551 320 560 358 560 _c +420 560 468 540 500 501 _c +532 462 549 405 549 330 _c +_cl}_d +/o{612 0 55 -13 557 560 _sc +306 484 _m +258 484 220 465 192 427 _c +164 389 150 338 150 273 _c +150 207 163 156 191 118 _c +219 80 257 62 306 62 _c +354 62 392 80 420 118 _c +448 156 462 207 462 273 _c +462 337 448 389 420 427 _c +392 465 354 484 306 484 _c +306 560 _m +384 560 445 534 490 484 _c +534 433 557 363 557 273 _c +557 183 534 113 490 63 _c +445 12 384 -13 306 -13 _c +227 -13 165 12 121 63 _c +77 113 55 183 55 273 _c +55 363 77 433 121 484 _c +165 534 227 560 306 560 _c +_cl}_d +/p{{635 0 91 -207 580 560 _sc +181 82 _m +181 -207 _l +91 -207 _l +91 547 _l +181 547 _l +181 464 _l +199 496 223 520 252 536 _c +281 552 316 560 356 560 _c +422 560 476 533 518 481 _c +559 428 580 359 580 273 _c +580 187 559 117 518 65 _c +476 13 422 -13 356 -13 _c +316 -13 281 -5 252 10 _c +223 25 199 49 181 82 _c +487 273 _m +487 339 473 390 446 428 _c +418 466 381 485 334 485 _c +286 485 249 466 222 428 _c +194 390 181 339 181 273 _c +181 207 194 155 222 117 _c +249 79 286 61 334 61 _c +381 61 418 79 446 117 _c +473 155 487 207 487 273 _c +_cl}_e}_d +/r{411 0 91 0 411 560 _sc +411 463 _m +401 469 390 473 378 476 _c +366 478 353 480 339 480 _c +288 480 249 463 222 430 _c +194 397 181 350 181 288 _c +181 0 _l +91 0 _l +91 547 _l +181 547 _l +181 462 _l +199 495 224 520 254 536 _c +284 552 321 560 365 560 _c +371 560 378 559 386 559 _c +393 558 401 557 411 555 _c +411 463 _l +_cl}_d +/s{{521 0 54 -13 472 560 _sc +443 531 _m +443 446 _l +417 458 391 468 364 475 _c +336 481 308 485 279 485 _c +234 485 200 478 178 464 _c +156 450 145 430 145 403 _c +145 382 153 366 169 354 _c +185 342 217 330 265 320 _c +296 313 _l +360 299 405 279 432 255 _c +458 230 472 195 472 151 _c +472 100 452 60 412 31 _c +372 1 316 -13 246 -13 _c +216 -13 186 -10 154 -5 _c +122 0 89 8 54 20 _c +54 113 _l +87 95 120 82 152 74 _c +184 65 216 61 248 61 _c +290 61 323 68 346 82 _c +368 96 380 117 380 144 _c +380 168 371 187 355 200 _c +339 213 303 226 247 238 _c +216 245 _l +160 257 119 275 95 299 _c +70 323 58 356 58 399 _c +58 450 76 490 112 518 _c +148 546 200 560 268 560 _c +}_e{301 560 332 557 362 552 _c +391 547 418 540 443 531 _c +_cl}_e}_d +/t{392 0 27 0 368 702 _sc +183 702 _m +183 547 _l +368 547 _l +368 477 _l +183 477 _l +183 180 _l +183 135 189 106 201 94 _c +213 81 238 75 276 75 _c +368 75 _l +368 0 _l +276 0 _l +206 0 158 13 132 39 _c +106 65 93 112 93 180 _c +93 477 _l +27 477 _l +27 547 _l +93 547 _l +93 702 _l +183 702 _l +_cl}_d +/u{634 0 85 -13 543 560 _sc +85 216 _m +85 547 _l +175 547 _l +175 219 _l +175 167 185 129 205 103 _c +225 77 255 64 296 64 _c +344 64 383 79 411 110 _c +439 141 453 183 453 237 _c +453 547 _l +543 547 _l +543 0 _l +453 0 _l +453 84 _l +431 50 405 26 377 10 _c +348 -5 315 -13 277 -13 _c +214 -13 166 6 134 45 _c +101 83 85 140 85 216 _c +_cl}_d +/v{592 0 30 0 562 547 _sc +30 547 _m +125 547 _l +296 88 _l +467 547 _l +562 547 _l +357 0 _l +235 0 _l +30 547 _l +_cl}_d +/w{818 0 42 0 776 547 _sc +42 547 _m +132 547 _l +244 120 _l +356 547 _l +462 547 _l +574 120 _l +686 547 _l +776 547 _l +633 0 _l +527 0 _l +409 448 _l +291 0 _l +185 0 _l +42 547 _l +_cl}_d +/x{592 0 29 0 559 547 _sc +549 547 _m +351 281 _l +559 0 _l +453 0 _l +294 215 _l +135 0 _l +29 0 _l +241 286 _l +47 547 _l +153 547 _l +298 352 _l +443 547 _l +549 547 _l +_cl}_d +/alpha{{659 0 55 -11 611 559 _sc +413 254 _m +392 367 _l +377 444 341 483 283 483 _c +239 483 207 465 188 429 _c +162 384 150 332 150 273 _c +150 201 162 148 187 114 _c +211 79 243 62 283 62 _c +326 62 359 96 383 166 _c +413 254 _l +463 404 _m +512 547 _l +592 547 _l +492 250 _l +511 144 _l +514 128 521 113 533 100 _c +546 84 558 76 568 76 _c +611 76 _l +611 0 _l +558 0 _l +}_e{527 0 498 13 471 41 _c +457 55 448 76 442 104 _c +427 68 404 36 374 8 _c +360 -4 329 -11 283 -11 _c +206 -11 149 13 112 62 _c +74 113 55 183 55 273 _c +55 369 75 439 117 484 _c +163 534 218 559 283 559 _c +384 559 444 507 463 404 _c +_cl}_e}_d +/minus{838 0 106 272 732 355 _sc +106 355 _m +732 355 _l +732 272 _l +106 272 _l +106 355 _l +_cl}_d +end readonly def + +/BuildGlyph + {exch begin + CharStrings exch + 2 copy known not{pop /.notdef}if + true 3 1 roll get exec + end}_d + +/BuildChar { + 1 index /Encoding get exch get + 1 index /BuildGlyph get exec +}_d + +FontName currentdict end definefont pop +end +%%EndProlog +mpldict begin +-307.8 103.95 translate +1227.6 584.1 0 0 clipbox +1.000 setlinewidth +1 setlinejoin +2 setlinecap +[] 0 setdash +1.000 setgray +gsave +0 0 m +1227.6 0 l +1227.6 584.1 l +0 584.1 l +0 0 l +gsave +fill +grestore +stroke +grestore +gsave +153.45 330.99 m +1104.84 330.99 l +1104.84 525.69 l +153.45 525.69 l +153.45 330.99 l +fill +grestore +0.000 0.000 1.000 setrgbcolor +gsave +951.4 194.7 153.5 331 clipbox +153.45 525.69 m +185.163 421.137 l +216.876 418.999 l +248.589 407.09 l +280.302 406.852 l +312.015 396.796 l +343.728 397.479 l +375.441 388.417 l +407.154 389.631 l +438.867 381.173 l +470.58 382.725 l +502.293 374.662 l +stroke +grestore +0.000 0.500 0.000 setrgbcolor +gsave +951.4 194.7 153.5 331 clipbox +153.45 525.69 m +185.163 492.048 l +216.876 483.467 l +248.589 476.109 l +280.302 469.343 l +312.015 462.898 l +343.728 456.643 l +375.441 450.509 l +407.154 444.465 l +438.867 438.502 l +470.58 432.632 l +502.293 426.888 l +534.006 421.331 l +565.719 416.056 l +597.432 411.192 l +629.145 406.891 l +660.858 403.285 l +692.571 400.438 l +724.284 398.314 l +755.997 396.792 l +787.71 395.721 l +819.423 394.959 l +851.136 394.399 l +882.849 393.965 l +914.562 393.609 l +946.275 393.301 l +977.988 393.022 l +1009.7 392.762 l +1041.41 392.515 l +1073.13 392.276 l +stroke +grestore +1.000 0.000 0.000 setrgbcolor +gsave +951.4 194.7 153.5 331 clipbox +153.45 525.69 m +185.163 498.699 l +216.876 466.484 l +248.589 441.148 l +280.302 417.471 l +312.015 396.797 l +stroke +grestore +0.000 0.750 0.750 setrgbcolor +gsave +951.4 194.7 153.5 331 clipbox +153.45 525.69 m +185.163 421.137 l +216.876 389.087 l +stroke +grestore +0.500 setlinewidth +0 setlinecap +0.000 setgray +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +153.45 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +153.45 525.69 o +grestore +/DejaVuSans findfont +12.000 scalefont +setfont +gsave +150.426563 317.911875 translate +0.000000 rotate +0.000000 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +312.015 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +312.015 525.69 o +grestore +gsave +309.179063 318.068125 translate +0.000000 rotate +0.000000 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +470.58 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +470.58 525.69 o +grestore +gsave +463.994063 317.911875 translate +0.000000 rotate +0.000000 0.171875 m /one glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +629.145 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +629.145 525.69 o +grestore +gsave +622.684063 318.068125 translate +0.000000 rotate +0.000000 0.171875 m /one glyphshow +7.634766 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +787.71 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +787.71 525.69 o +grestore +gsave +780.905313 317.911875 translate +0.000000 rotate +0.000000 0.171875 m /two glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +946.275 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +946.275 525.69 o +grestore +gsave +939.595313 317.911875 translate +0.000000 rotate +0.000000 0.171875 m /two glyphshow +7.634766 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +1104.84 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +1104.84 525.69 o +grestore +gsave +1098.058750 317.911875 translate +0.000000 rotate +0.000000 0.171875 m /three glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +604.778 303.615 m +0 0.172 rmoveto +(Iteration) show +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 330.99 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 330.99 o +grestore +gsave +124.450000 323.490000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/hyphen glyphshow + +18.300586 8.875000 moveto +/four glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 379.665 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 379.665 o +grestore +gsave +124.450000 372.165000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/three glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 428.34 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 428.34 o +grestore +gsave +124.450000 420.840000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/hyphen glyphshow + +18.300586 8.765625 moveto +/two glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 477.015 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 477.015 o +grestore +gsave +124.450000 469.515000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.937500 moveto +/one glyphshow + +7.634766 1.937500 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.875000 moveto +/hyphen glyphshow + +18.300586 8.875000 moveto +/one glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 525.69 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 525.69 o +grestore +gsave +127.450000 518.190000 translate +0.000000 rotate +/DejaVuSans findfont +12.0 scalefont +setfont +0.000000 1.828125 moveto +/one glyphshow + +7.634766 1.828125 moveto +/zero glyphshow + +/DejaVuSans findfont +8.4 scalefont +setfont +15.269531 8.765625 moveto +/zero glyphshow + + +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 345.643 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 345.643 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 354.214 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 354.214 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 360.295 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 360.295 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 365.012 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 365.012 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 368.867 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 368.867 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 372.125 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 372.125 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 374.948 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 374.948 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 377.438 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 377.438 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 394.318 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 394.318 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 402.889 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 402.889 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 408.97 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 408.97 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 413.687 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 413.687 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 417.542 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 417.542 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 420.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 420.8 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 423.623 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 423.623 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 426.113 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 426.113 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 442.993 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 442.993 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 451.564 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 451.564 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 457.645 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 457.645 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 462.362 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 462.362 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 466.217 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 466.217 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 469.475 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 469.475 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 472.298 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 472.298 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 474.788 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 474.788 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 491.668 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 491.668 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 500.239 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 500.239 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 506.32 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 506.32 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 511.037 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 511.037 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 514.892 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 514.892 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 518.15 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 518.15 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 520.973 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 520.973 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +2 0 l +stroke +grestore +} bind def +153.45 523.463 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-2 0 l +stroke +grestore +} bind def +1104.84 523.463 o +grestore +119.45 378.981 m +gsave +90 rotate +0 0.172 rmoveto +(Relative residual) show +grestore +1.000 setlinewidth +2 setlinecap +gsave +153.45 525.69 m +1104.84 525.69 l +stroke +grestore +gsave +1104.84 330.99 m +1104.84 525.69 l +stroke +grestore +gsave +153.45 330.99 m +1104.84 330.99 l +stroke +grestore +gsave +153.45 330.99 m +153.45 525.69 l +stroke +grestore +/DejaVuSans findfont +14.400 scalefont +setfont +570.075 530.69 m +0 0.203 rmoveto +(Relative residual) show +gsave +849.456 430.37 m +1097.64 430.37 l +1097.64 518.49 l +849.456 518.49 l +849.456 430.37 l +cl +gsave +1.000 setgray +fill +grestore +stroke +grestore +0.000 0.000 1.000 setrgbcolor +gsave +859.536 506.77 m +879.696 506.77 l +stroke +grestore +0.000 setgray +gsave +895.536250 498.730000 translate +0.000000 rotate +/DejaVuSans findfont +14.4 scalefont +setfont +0.000000 3.359375 moveto +/O glyphshow + +11.326996 3.359375 moveto +/p glyphshow + +20.461670 3.359375 moveto +/t glyphshow + +26.104080 3.359375 moveto +/i glyphshow + +30.102249 3.359375 moveto +/m glyphshow + +44.120453 3.359375 moveto +/a glyphshow + +52.938919 3.359375 moveto +/l glyphshow + +56.937088 3.359375 moveto +/space glyphshow + +61.511444 3.359375 moveto +/alpha glyphshow + + +grestore +0.000 0.500 0.000 setrgbcolor +gsave +859.536 485.57 m +879.696 485.57 l +stroke +grestore +0.000 setgray +gsave +895.536250 479.530000 translate +0.000000 rotate +/DejaVuSans findfont +14.4 scalefont +setfont +0.000000 1.609375 moveto +/alpha glyphshow + +9.486008 1.609375 moveto +/space glyphshow + +14.060364 1.609375 moveto +/equal glyphshow + +26.118134 1.609375 moveto +/space glyphshow + +30.692490 1.609375 moveto +/zero glyphshow + +39.848236 1.609375 moveto +/period glyphshow + +44.422592 1.609375 moveto +/one glyphshow + + +grestore +1.000 0.000 0.000 setrgbcolor +gsave +859.536 464.823 m +879.696 464.823 l +stroke +grestore +0.000 setgray +895.536 459.58 m +0 0.203 rmoveto +(Newtons method) show +0.000 0.750 0.750 setrgbcolor +gsave +859.536 444.076 m +879.696 444.076 l +stroke +grestore +0.000 setgray +895.536 436.13 m +0 2.906 rmoveto +(Steepest first, then Newton) show +gsave +153.45 58.41 m +1104.84 58.41 l +1104.84 253.11 l +153.45 253.11 l +153.45 58.41 l +1.000 setgray +fill +grestore +0.000 0.000 1.000 setrgbcolor +gsave +951.4 194.7 153.5 58.41 clipbox +153.45 235.343 m +185.163 86.1989 l +216.876 86.1401 l +248.589 86.1105 l +280.302 86.0941 l +312.015 86.0842 l +343.728 86.0778 l +375.441 86.0736 l +407.154 86.0707 l +438.867 86.0686 l +470.58 86.0672 l +502.293 86.0661 l +stroke +grestore +0.000 0.500 0.000 setrgbcolor +gsave +951.4 194.7 153.5 58.41 clipbox +153.45 235.343 m +185.163 104.106 l +216.876 94.9383 l +248.589 90.7582 l +280.302 88.6472 l +312.015 87.5265 l +343.728 86.9149 l +375.441 86.5756 l +407.154 86.3853 l +438.867 86.2777 l +470.58 86.2164 l +502.293 86.1811 l +534.006 86.1606 l +565.719 86.1484 l +597.432 86.1409 l +629.145 86.1362 l +660.858 86.1329 l +692.571 86.1306 l +724.284 86.1288 l +755.997 86.1273 l +787.71 86.126 l +819.423 86.1248 l +851.136 86.1237 l +882.849 86.1226 l +914.562 86.1216 l +946.275 86.1206 l +977.988 86.1196 l +1009.7 86.1187 l +1041.41 86.1178 l +1073.13 86.1169 l +stroke +grestore +1.000 0.000 0.000 setrgbcolor +gsave +951.4 194.7 153.5 58.41 clipbox +153.45 235.343 m +185.163 107.225 l +216.876 88.8794 l +248.589 86.7359 l +280.302 86.2559 l +312.015 86.1239 l +stroke +grestore +0.000 0.750 0.750 setrgbcolor +gsave +951.4 194.7 153.5 58.41 clipbox +153.45 235.343 m +185.163 86.1989 l +216.876 86.0776 l +stroke +grestore +0.500 setlinewidth +0 setlinecap +0.000 setgray +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +153.45 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +153.45 253.11 o +grestore +/DejaVuSans findfont +12.000 scalefont +setfont +gsave +150.426563 45.331875 translate +0.000000 rotate +0.000000 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +312.015 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +312.015 253.11 o +grestore +gsave +309.179063 45.488125 translate +0.000000 rotate +0.000000 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +470.58 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +470.58 253.11 o +grestore +gsave +463.994063 45.331875 translate +0.000000 rotate +0.000000 0.171875 m /one glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +629.145 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +629.145 253.11 o +grestore +gsave +622.684063 45.488125 translate +0.000000 rotate +0.000000 0.171875 m /one glyphshow +7.634766 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +787.71 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +787.71 253.11 o +grestore +gsave +780.905313 45.331875 translate +0.000000 rotate +0.000000 0.171875 m /two glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +946.275 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +946.275 253.11 o +grestore +gsave +939.595313 45.331875 translate +0.000000 rotate +0.000000 0.171875 m /two glyphshow +7.634766 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 4 l +stroke +grestore +} bind def +1104.84 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +0 -4 l +stroke +grestore +} bind def +1104.84 253.11 o +grestore +gsave +1098.058750 45.331875 translate +0.000000 rotate +0.000000 0.171875 m /three glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +604.778 31.035 m +0 0.172 rmoveto +(Iteration) show +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 58.41 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 58.41 o +grestore +gsave +134.059375 53.949062 translate +0.000000 rotate +0.000000 0.171875 m /minus glyphshow +10.054688 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 86.2243 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 86.2243 o +grestore +gsave +143.403125 81.685223 translate +0.000000 rotate +0.000000 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 114.039 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 114.039 o +grestore +gsave +143.778125 109.577634 translate +0.000000 rotate +0.000000 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 141.853 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 141.853 o +grestore +gsave +136.278125 137.313795 translate +0.000000 rotate +0.000000 0.171875 m /one glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 169.667 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 169.667 o +grestore +gsave +136.528125 165.206205 translate +0.000000 rotate +0.000000 0.171875 m /one glyphshow +7.634766 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 197.481 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 197.481 o +grestore +gsave +135.840625 192.942366 translate +0.000000 rotate +0.000000 0.171875 m /two glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 225.296 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 225.296 o +grestore +gsave +136.090625 220.756652 translate +0.000000 rotate +0.000000 0.171875 m /two glyphshow +7.634766 0.171875 m /five glyphshow +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +4 0 l +stroke +grestore +} bind def +153.45 253.11 o +grestore +gsave +/o { +gsave +newpath +translate +0 0 m +-4 0 l +stroke +grestore +} bind def +1104.84 253.11 o +grestore +gsave +135.887500 248.570938 translate +0.000000 rotate +0.000000 0.171875 m /three glyphshow +7.634766 0.171875 m /zero glyphshow +grestore +129.059 144.549 m +gsave +90 rotate +0 2.5 rmoveto +(g\(x\)) show +grestore +1.000 setlinewidth +2 setlinecap +gsave +153.45 253.11 m +1104.84 253.11 l +stroke +grestore +gsave +1104.84 58.41 m +1104.84 253.11 l +stroke +grestore +gsave +153.45 58.41 m +1104.84 58.41 l +stroke +grestore +gsave +153.45 58.41 m +153.45 253.11 l +stroke +grestore +/DejaVuSans findfont +14.400 scalefont +setfont +577.004 258.11 m +0 0.203 rmoveto +(Function value) show + +end +showpage diff --git a/main.py b/main.py index 96e8a16..981ee9e 100644 --- a/main.py +++ b/main.py @@ -12,7 +12,7 @@ def main(): b = np.array([-0.3119187, 0.14508516]) c = np.array([ 0.47736331, 1.48834978]) - x0 = np.array([ 3.1, 3.8]) + x0 = np.array([-2.1, 3.2]) function_values = [] diff --git a/newtsteep.py b/newtsteep.py new file mode 100644 index 0000000..977a02f --- /dev/null +++ b/newtsteep.py @@ -0,0 +1,25 @@ +import numpy as np +import generate as g +import steepest as sd +import newton +import surf +import matplotlib.pyplot as plt +from function import gradient_g +from numpy.linalg import norm + +def newtsteep(x0, H, b, c, steep_tol, newt_tol): + x = [] + r = [] + + # Finne optimal alpha og kjore en iterasjon med steepest. + x0_norm = norm(gradient_g(x0, H, b, c)) + points, residuals = sd.steepest(x0, H, b, c, steep_tol, 100, 0, x0_norm) + x.extend(points) + r.extend(residuals) + + # Angir tolerance og kjorer Newtons til vi finner nullpunkt. + points, residuals = newton.newton(x[len(x)-1], H, b, c, newt_tol, 100, x0_norm) + x.extend(points[1:]) + r.extend(residuals[1:]) + + return (x, r) diff --git a/rapport.tex b/rapport.tex index 29a90b1..b02424d 100644 --- a/rapport.tex +++ b/rapport.tex @@ -135,10 +135,17 @@ Hence $\mathbf{v}^{T}(H+C(\mathbf{x}))\mathbf{v} > 0$, and we see by definition To find the optimal step length, $\alpha^*$, we solve the equation \begin{eqnarray} -\frac{\partial}{\partial \mathbf{\alpha}}g\left(\mathbf{x}^{(k)}+\alpha\mathbf{u}^{(k)}\right) &=& 0, \text{where } \mathbf{u}^{(k)} = -\nabla g(\mathbf{x}^{(k)} ) \nonumber \\ +\frac{\partial}{\partial \mathbf{\alpha}}g\left(\mathbf{x}+\alpha\mathbf{u}\right) &=& 0, \text{where } \mathbf{u} = -\nabla g(\mathbf{x} ) \nonumber \\ &\Updownarrow& \nonumber\\ %HER ER DET FEIL! -\frac{1}{3}(\mathbf{u}^{(k)})^TC(\mathbf{u}^{(k)})\mathbf{u}^{(k)}\alpha^3+ (\mathbf{x}^{(k)})^TC(\mathbf{u}^{(k)}) \mathbf{u}^{(k)}\alpha^2+(\mathbf{u}^{(k)})^TH\mathbf{u}^{(k)}+(\mathbf{u}^{(k)})^TC(\mathbf{x}^{(k)})\mathbf{u}^{(k)})\alpha + \frac{1}{3}(\mathbf{u}^{(k)})^TC(\mathbf{x}^{(k)})\mathbf{x}^{(k)}+(\mathbf{u}^{(k)})^TH\mathbf{x}^{(k)}-\mathbf{b}^T\mathbf{u}^{(k)} = 0 +A\alpha^3 + B\alpha^2 + C\alpha + D &=& 0, +\end{eqnarray} +der $A$, $B$, $C$ og $D$ er gitt ved +\begin{eqnarray} +A &=& \frac{1}{3}\mathbf{u}^TC(\mathbf{u}\mathbf{u} \nonumber \\ +B &=& (\mathbf{x})^TC(\mathbf{u}) \mathbf{u} \nonumber \\ +C &=& (\mathbf{u})^TH\mathbf{u}+(\mathbf{u})^TC(\mathbf{x})\mathbf{u}) \nonumber \\ +D &=& \frac{1}{3}(\mathbf{u})^TC(\mathbf{x})\mathbf{x}+(\mathbf{u})^TH\mathbf{x}-\mathbf{b}^T\mathbf{u} \end{eqnarray} % VI MÅ OGSÅ ha utledning av alt det andre, forklaring diff --git a/steepest.eps b/steepest.eps index 7c543e6..bae093b 100644 --- a/steepest.eps +++ b/steepest.eps @@ -1,7 +1,7 @@ %!PS-Adobe-3.0 EPSF-3.0 %%Title: steepest.eps %%Creator: matplotlib version 0.99.3, http://matplotlib.sourceforge.net/ -%%CreationDate: Fri Sep 30 11:39:59 2011 +%%CreationDate: Fri Sep 30 11:50:53 2011 %%Orientation: portrait %%BoundingBox: -307 103 919 688 %%EndComments @@ -864,74 +864,71 @@ grestore gsave 951.4 194.7 153.5 331 clipbox 153.45 525.69 m -185.163 493.557 l -216.876 461.083 l -248.589 448.62 l -280.302 423.009 l -312.015 426.295 l -343.728 398.538 l -375.441 413.384 l -407.154 384.564 l -438.867 404.651 l -470.58 375.46 l +185.163 421.137 l +216.876 418.999 l +248.589 407.09 l +280.302 406.852 l +312.015 396.796 l +343.728 397.479 l +375.441 388.417 l +407.154 389.631 l +438.867 381.173 l +470.58 382.725 l +502.293 374.662 l stroke grestore 0.000 0.500 0.000 setrgbcolor gsave 951.4 194.7 153.5 331 clipbox 153.45 525.69 m -185.163 493.348 l -216.876 481.565 l -248.589 473.433 l -280.302 467.353 l -312.015 462.503 l -343.728 458.42 l -375.441 454.855 l -407.154 451.664 l -438.867 448.764 l -470.58 446.101 l -502.293 443.636 l -534.006 441.343 l -565.719 439.201 l -597.432 437.191 l -629.145 435.301 l -660.858 433.519 l -692.571 431.833 l -724.284 430.236 l -755.997 428.72 l -787.71 427.278 l -819.423 425.904 l -851.136 424.592 l -882.849 423.339 l -914.562 422.14 l -946.275 420.99 l -977.988 419.887 l -1009.7 418.828 l -1041.41 417.809 l -1073.13 416.828 l +185.163 492.048 l +216.876 483.467 l +248.589 476.109 l +280.302 469.343 l +312.015 462.898 l +343.728 456.643 l +375.441 450.509 l +407.154 444.465 l +438.867 438.502 l +470.58 432.632 l +502.293 426.888 l +534.006 421.331 l +565.719 416.056 l +597.432 411.192 l +629.145 406.891 l +660.858 403.285 l +692.571 400.438 l +724.284 398.314 l +755.997 396.792 l +787.71 395.721 l +819.423 394.959 l +851.136 394.399 l +882.849 393.965 l +914.562 393.609 l +946.275 393.301 l +977.988 393.022 l +1009.7 392.762 l +1041.41 392.515 l +1073.13 392.276 l stroke grestore 1.000 0.000 0.000 setrgbcolor gsave 951.4 194.7 153.5 331 clipbox 153.45 525.69 m -185.163 500.121 l -216.876 474.956 l -248.589 450.505 l -280.302 426.607 l -312.015 404.076 l -343.728 384.897 l +185.163 498.699 l +216.876 466.484 l +248.589 441.148 l +280.302 417.471 l +312.015 396.797 l stroke grestore 0.000 0.750 0.750 setrgbcolor gsave 951.4 194.7 153.5 331 clipbox 153.45 525.69 m -185.163 493.557 l -216.876 461.083 l -248.589 437.307 l -280.302 414.139 l -312.015 393.303 l +185.163 421.137 l +216.876 389.087 l stroke grestore 0.500 setlinewidth @@ -2308,75 +2305,72 @@ grestore 0.000 0.000 1.000 setrgbcolor gsave 951.4 194.7 153.5 58.41 clipbox -153.45 236.267 m -185.163 107.313 l -216.876 85.3725 l -248.589 83.4367 l -280.302 82.9228 l -312.015 82.7593 l -343.728 82.6943 l -375.441 82.6609 l -407.154 82.6417 l -438.867 82.6291 l -470.58 82.6207 l +153.45 235.343 m +185.163 86.1989 l +216.876 86.1401 l +248.589 86.1105 l +280.302 86.0941 l +312.015 86.0842 l +343.728 86.0778 l +375.441 86.0736 l +407.154 86.0707 l +438.867 86.0686 l +470.58 86.0672 l +502.293 86.0661 l stroke grestore 0.000 0.500 0.000 setrgbcolor gsave 951.4 194.7 153.5 58.41 clipbox -153.45 236.267 m -185.163 107.57 l -216.876 94.4353 l -248.589 89.8064 l -280.302 87.566 l -312.015 86.2702 l -343.728 85.4367 l -375.441 84.8634 l -407.154 84.4508 l -438.867 84.1436 l -470.58 83.9089 l -502.293 83.7256 l -534.006 83.5799 l -565.719 83.4621 l -597.432 83.3657 l -629.145 83.2858 l -660.858 83.2188 l -692.571 83.162 l -724.284 83.1135 l -755.997 83.0718 l -787.71 83.0355 l -819.423 83.0039 l -851.136 82.976 l -882.849 82.9514 l -914.562 82.9295 l -946.275 82.9099 l -977.988 82.8923 l -1009.7 82.8765 l -1041.41 82.8621 l -1073.13 82.8491 l +153.45 235.343 m +185.163 104.106 l +216.876 94.9383 l +248.589 90.7582 l +280.302 88.6472 l +312.015 87.5265 l +343.728 86.9149 l +375.441 86.5756 l +407.154 86.3853 l +438.867 86.2777 l +470.58 86.2164 l +502.293 86.1811 l +534.006 86.1606 l +565.719 86.1484 l +597.432 86.1409 l +629.145 86.1362 l +660.858 86.1329 l +692.571 86.1306 l +724.284 86.1288 l +755.997 86.1273 l +787.71 86.126 l +819.423 86.1248 l +851.136 86.1237 l +882.849 86.1226 l +914.562 86.1216 l +946.275 86.1206 l +977.988 86.1196 l +1009.7 86.1187 l +1041.41 86.1178 l +1073.13 86.1169 l stroke grestore 1.000 0.000 0.000 setrgbcolor gsave 951.4 194.7 153.5 58.41 clipbox -153.45 236.267 m -185.163 113.575 l -216.876 88.888 l -248.589 83.9725 l -280.302 82.9548 l -312.015 82.7133 l -343.728 82.6365 l +153.45 235.343 m +185.163 107.225 l +216.876 88.8794 l +248.589 86.7359 l +280.302 86.2559 l +312.015 86.1239 l stroke grestore 0.000 0.750 0.750 setrgbcolor gsave 951.4 194.7 153.5 58.41 clipbox -153.45 236.267 m -185.163 107.313 l -216.876 85.3725 l -248.589 83.2462 l -280.302 82.7874 l -312.015 82.6638 l +153.45 235.343 m +185.163 86.1989 l +216.876 86.0776 l stroke grestore 0.500 setlinewidth @@ -2636,7 +2630,7 @@ translate stroke grestore } bind def -153.45 82.7475 o +153.45 86.2243 o grestore gsave /o { @@ -2648,10 +2642,10 @@ translate stroke grestore } bind def -1104.84 82.7475 o +1104.84 86.2243 o grestore gsave -143.403125 78.208437 translate +143.403125 81.685223 translate 0.000000 rotate 0.000000 0.171875 m /zero glyphshow grestore @@ -2665,7 +2659,7 @@ translate stroke grestore } bind def -153.45 107.085 o +153.45 114.039 o grestore gsave /o { @@ -2677,10 +2671,10 @@ translate stroke grestore } bind def -1104.84 107.085 o +1104.84 114.039 o grestore gsave -143.778125 102.624062 translate +143.778125 109.577634 translate 0.000000 rotate 0.000000 0.171875 m /five glyphshow grestore @@ -2694,7 +2688,7 @@ translate stroke grestore } bind def -153.45 131.422 o +153.45 141.853 o grestore gsave /o { @@ -2706,10 +2700,10 @@ translate stroke grestore } bind def -1104.84 131.422 o +1104.84 141.853 o grestore gsave -136.278125 126.883437 translate +136.278125 137.313795 translate 0.000000 rotate 0.000000 0.171875 m /one glyphshow 7.634766 0.171875 m /zero glyphshow @@ -2724,7 +2718,7 @@ translate stroke grestore } bind def -153.45 155.76 o +153.45 169.667 o grestore gsave /o { @@ -2736,10 +2730,10 @@ translate stroke grestore } bind def -1104.84 155.76 o +1104.84 169.667 o grestore gsave -136.528125 151.299062 translate +136.528125 165.206205 translate 0.000000 rotate 0.000000 0.171875 m /one glyphshow 7.634766 0.171875 m /five glyphshow @@ -2754,7 +2748,7 @@ translate stroke grestore } bind def -153.45 180.097 o +153.45 197.481 o grestore gsave /o { @@ -2766,10 +2760,10 @@ translate stroke grestore } bind def -1104.84 180.097 o +1104.84 197.481 o grestore gsave -135.840625 175.558437 translate +135.840625 192.942366 translate 0.000000 rotate 0.000000 0.171875 m /two glyphshow 7.634766 0.171875 m /zero glyphshow @@ -2784,7 +2778,7 @@ translate stroke grestore } bind def -153.45 204.435 o +153.45 225.296 o grestore gsave /o { @@ -2796,10 +2790,10 @@ translate stroke grestore } bind def -1104.84 204.435 o +1104.84 225.296 o grestore gsave -136.090625 199.895938 translate +136.090625 220.756652 translate 0.000000 rotate 0.000000 0.171875 m /two glyphshow 7.634766 0.171875 m /five glyphshow @@ -2814,36 +2808,6 @@ translate stroke grestore } bind def -153.45 228.772 o -grestore -gsave -/o { -gsave -newpath -translate -0 0 m --4 0 l -stroke -grestore -} bind def -1104.84 228.772 o -grestore -gsave -135.887500 224.233437 translate -0.000000 rotate -0.000000 0.171875 m /three glyphshow -7.634766 0.171875 m /zero glyphshow -grestore -gsave -/o { -gsave -newpath -translate -0 0 m -4 0 l -stroke -grestore -} bind def 153.45 253.11 o grestore gsave @@ -2859,10 +2823,10 @@ grestore 1104.84 253.11 o grestore gsave -136.137500 248.570938 translate +135.887500 248.570938 translate 0.000000 rotate 0.000000 0.171875 m /three glyphshow -7.634766 0.171875 m /five glyphshow +7.634766 0.171875 m /zero glyphshow grestore 129.059 144.549 m gsave -- 2.47.3