Thread Subject: function with bisection method

Subject: function with bisection method

From: Theo Kalfas

Date: 2 May, 2011 09:03:04

Message: 1 of 3

Hi, I have this equation sin(x^2)+x^2=2x+0.09 and i would like to write a function for finding a root of this equation by the bisection method.

I have the algorithm of bisection but i don't know how can i use it in this example.Any ideas?
initialize a=..., b=....
for k=1,2...
Xm=a+(b-a)/2
if sign(f(Xm))=sign(f(Xa))
a=Xm
else
b=Xm
end
if converged,stop end

Subject: function with bisection method

From: TideMan

Date: 2 May, 2011 10:47:01

Message: 2 of 3

On May 2, 9:03 pm, "Theo Kalfas" <k_thodo...@yahoo.gr> wrote:
> Hi, I have this equation sin(x^2)+x^2=2x+0.09 and i would like to write a function for finding a root of this equation by the bisection method.
>
> I have the algorithm of bisection but i don't know how can i use it in this example.Any ideas?
> initialize a=..., b=....
> for k=1,2...
> Xm=a+(b-a)/2
> if sign(f(Xm))=sign(f(Xa))
> a=Xm
> else
> b=Xm
> end
> if converged,stop end

AKA Regula Falsi
Google it.

Subject: function with bisection method

From: Steven_Lord

Date: 2 May, 2011 13:27:38

Message: 3 of 3



"Theo Kalfas" <k_thodoros@yahoo.gr> wrote in message
news:ipls08$i7o$1@fred.mathworks.com...
> Hi, I have this equation sin(x^2)+x^2=2x+0.09 and i would like to write a
> function for finding a root of this equation by the bisection method.
> I have the algorithm of bisection but i don't know how can i use it in
> this example.Any ideas?

If sin(x.^2)+x.^2 = 2*x + 0.09, then what does (sin(x.^2)+x.^2) - (2*x +
0.09) equal? Is the latter problem one you can solve?

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
bisection Theo 2 May, 2011 05:03:42
rssFeed for this Thread

Contact us at files@mathworks.com