Programming

Programming questions? Ask a programmer for answers ASAP

Connect one-on-one with {0} who will answer your question

•The Secant method. Begin again...

•The Secant method. Begin again with a function f and a pair of points "close to" the root, which we'll call a0 and a1. Note that we are not assuming that f changes sign on the interval [a0, a1]. We assume that f(a1) < f(a0), otherwise just swap the two. Now find the equation of the line line through (a0,f(a0)) and (a1,f(a1)) (this line is called a

For Rouleau only.

secant line) and solve for its root (again use the point slope formula for the line and just solve the linear equation in the ordinary way). This root is a2. To proceed find the slope of the secant line to f through a1 and a2, and then find its root, which will be a3, and so on. Again we stop when the distance between an-1 and an is small.

1.Write a function secant(f,a0,a1,count=0) that implements the secant method for finding roots of an equation.

2.Compare the convergence of the secant method to the bisection method above. Can you find a function for which the secant method doesn't converge? What happens to make this so? [ f(x)= x^2 -2] this function will not converge because the secant is on a srtght line between -2,and 2 thereforth there is no Tangent.

For Rouleau only.

secant line) and solve for its root (again use the point slope formula for the line and just solve the linear equation in the ordinary way). This root is a2. To proceed find the slope of the secant line to f through a1 and a2, and then find its root, which will be a3, and so on. Again we stop when the distance between an-1 and an is small.

1.Write a function secant(f,a0,a1,count=0) that implements the secant method for finding roots of an equation.

2.Compare the convergence of the secant method to the bisection method above. Can you find a function for which the secant method doesn't converge? What happens to make this so? [ f(x)= x^2 -2] this function will not converge because the secant is on a srtght line between -2,and 2 thereforth there is no Tangent.

Show More

Show Less

Was this answer helpful?

Describe your issueThe assistant will guide you

Chat 1:1 with a programmerLicensed Experts are available 24/7

100% satisfaction guaranteeGet all the answers you need

Related Programming Questions

Determining fluid flow through pipes and tubes has great

Determining fluid flow through pipes and tubes has great relevance in many areas of engineering and science. In mechanical and aerospace engineering, typical applications include the flow of liquids a… read more

The below exercises are to be done using openGL on C++Develop

The below exercises are to be done using openGL on C++ Develop a program to display a pie chart. Hints: a. Refer to "ch4PieChart.txt" b. the “midpoint” routine does NOT have to be used to draw the cir… read more

For Drouleau only Write a function bisect1(f,a,b,counter=0)

For Drouleau only Write a function bisect1(f,a,b,counter=0) that implements this stopping criterion instead. You might want to play with a few different f and see what happens with the convergence rat… read more

find the slope of the tangent line to the graph of the function

find the slope of the tangent line to the graph of the function at the specified point g(x)=x^2-4, (1,-3)… read more

The following formula gives the distance between two points,

The following formula gives the distance between two points, (x1, y1) and (x2, y2) in the Cartesian plane: Given the center and a point on the circle, you can use this formula to find the radius of th… read more

Quadratic Equation Given a quadratic equation in standard

Quadratic Equation Given a quadratic equation in standard form, ax2 + bx + c = 0, solutions for x can be determined using the quadratic formula, . The values of x can be real or complex. The discrimin… read more

I am working on a spreadsheet and have a question on a formula 41487

I am working on a spreadsheet and have a question on a formula 41487 41517 1 2 3 4 03/07/17 41667 41670(date value) 16 04/01/17 41671 41698 17 X 05/08/17 41699 41728 18 41699 41728 19 #'s 1,2,3,4 repr… read more

1) Write a program that raises an integer to a positive integer

1) Write a program that raises an integer to a positive integer power. Call the function x_to_the_n taking two integer arguments x and n. Have the function return a long int, which represents the resu… read more

Please how can I write a matlab code to know the value of f

Please how can I write a matlab code to know the value of f and g such that the following functions will be equal to zero. f1=det(I-H1*Bdiag*(f + u1*g)B'); f2=det(I-H1*Bdiag*(f + u2*g)B'); f3=det(I-H1… read more

Define deviational variables. What is separable programming

Define deviational variables. What is separable programming and describe its purpose. State the advantage of goal programming over linear programming.… read more

Please see a formula below I would like to "tweak" a bit and

Please see a formula below I would like to "tweak" a bit and not sure how. =IF(ISERROR(AVERAGE(IF('Global Tickets'!$E$2:$E$60000="Switzerland",'Global Tickets'!$X$2:$X$60000))),"",AVERAGE(IF('Global T… read more

What is the rate of change formula in excel I need both ways

what is the rate of change formula in excel I need both ways and how to calculate for yearly, monthly, quarterly, daily etc 1) straight line 2) compound… read more

Hi there, How do I determine the data points between columns

Hi there, How do I determine the data points between columns? Here is the partial data that I have on my spreadsheet for life expectancy and mortality rates. Is there any way that I can calculate this… read more

I need help creating some formulas. 1. I need a formula

I need help creating some formulas. 1. I need a formula to equal a given number in excel, but it cannot exceed a set value say an income number I have 2. along the same line, but the number cannot exc… read more

Using bisection method in Matlab, determine an approximation

Using the bisection method in Matlab, determine an approximation to the value of 'd' with an absolute error of less than 1 x 10^-6 ((270000/(2.01)*(d^2.01)) + ((24300/2.55)*(d^2.55)) = (768*10.29*d) +… read more

Q)Write transformation matrices to achieve each of the following

Q)Write transformation matrices to achieve each of the following 3D transformations? (i) Scale x by 3, y by 0.5 and z by 1 (ii) Undo a translation that has moved an object by 6 units up with respect t… read more

Im having trouble figuring out how to write a progressive if

Im having trouble figuring out how to write a progressive "if" formula. I want to input a Sales number (say 1,000,000), then have the next five cells determine if that number is XXXXX or less then put… read more

EXCEL QUESTION I want to add cells in an excel sheet. For

EXCEL QUESTION I want to add cells in an excel sheet. For example, I have 3 cells a1:a3 as follows: a1 = 1-1 a2 = 1-3 a3 = 2-2 The total in a4 should be 4-6. It seems so simple but I can't create a fo… read more

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.

JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.

Web sites like justanswer.com/legal

...leave nothing to chance.

...leave nothing to chance.

Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.

Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.

I will tell you that...the things you have to go through to be an Expert are quite rigorous.

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

New York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

Los Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

Hesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

Kernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

Woodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

Elkton, Maryland

< Previous | Next >

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

Computer Software Engineer

7,540 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

The-PC-Guy

Software Engineer

895 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

< Previous | Next >

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.