File:Brent method example.png

From formulasearchengine
Jump to navigation Jump to search

Original file(932 × 735 pixels, file size: 8 KB, MIME type: image/png)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Graph of (x + 3)(x − 1)2, used to illustrate Brent's method. Created by Jitse Niesen in Matlab.

Licensing

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Matlab code

f = @(x) (x+3).*(x-1).^2;
xs = linspace(-5,2.5);
ys = f(xs);

% x-axis
clf; hold on;
plot([-5 3], [0 0], 'k');
for k = -4:2
  if k ~= 0
    plot([k k], [0.7 -0.7], 'k');
    text(k, -1, int2str(k), 'HorizontalAlignment', 'center', ...
         'VerticalAlignment', 'top', 'FontSize', 12);
  end;
end;

% y-axis
plot([0 0], [-35 15], 'k');
for k = -30:5:10
  if k ~= 0
    plot([0.1 -0.1], [k k], 'k');
    text(-0.15, k, int2str(k), 'HorizontalAlignment', 'right', ...
         'VerticalAlignment', 'middle', 'FontSize', 12);
  end;
end;

% graph
plot(xs,ys, 'Linewidth',3);
axis([-4.5 2.1 -31 11]);
axis off;
print -dpng 'brent_tmp.png';
system('convert -trim +repage brent_tmp.png brent.png');

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

image/png

f3747c510e6bdf84bfc0737f4844dc8f5a582704

8,208 byte

735 pixel

932 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:21, 17 June 2006Thumbnail for version as of 11:21, 17 June 2006932 × 735 (8 KB)wikimediacommons>Jitse Niesenremove offset

There are no pages that use this file.