Setting up Newton Raphson integral with matlab

In summary, the conversation discussed using the Newton Raphson method to find the root of an equation involving an integral. The integral was evaluated using the trapazoidal rule and the simplified version of the equation was given. The speaker was struggling with integrating for x and solving for y, but another person pointed out that the integral can be solved exactly and then Newton's Method can be applied. The speaker then mentioned they still had a question to post later.
  • #1
Moly
21
0
Hi All.

I have an equation that i want to numerically find the root of by using Newton Raphson. However the equation involves an integral which i am using the trapazoidal rule to evaluate. And here is the simplified version of it:
[tex] 1 = e^{-cy} \int_0^1 e^{-y(1-x)} dx [/tex]

So i am supposed to integrate for x and then solve the resulting equation for values of y. How do i do that??

If i just wanted to do the integration, i would have used "syms" and found the result in terms of y... but i am totally stumped with this... please... SOS!
 
Physics news on Phys.org
  • #2
Well, look inside the integral. The variable is x, y is a constant inside the integral. We can easily solve that integral exactly, no need to approximate that integral.

After that, you will have on the RHS some exponential terms divided by y, which is easy to apply Newtons Method to.
 
  • #3
Thanks Gib.
I figured where i went wrong.. i still have a question that i will post later today
 

1. What is the Newton-Raphson method?

The Newton-Raphson method is an algorithm used to find the roots of a given function. It is an iterative process that uses the derivative of the function to approximate the roots.

2. How do you set up Newton-Raphson integral in Matlab?

To set up Newton-Raphson integral in Matlab, you will need to define the function you want to find the roots of, its derivative, and an initial guess. Then, you can use a loop to iteratively update the guess using the Newton-Raphson formula until the desired accuracy is achieved.

3. What are the advantages of using the Newton-Raphson method?

The Newton-Raphson method is a fast and efficient way to find the roots of a function. It often requires fewer iterations compared to other methods, making it a popular choice for numerical analysis. It also has a quadratic convergence rate, which means that the number of accurate digits doubles with each iteration.

4. What are the limitations of the Newton-Raphson method?

The Newton-Raphson method may fail to converge if the initial guess is not close enough to the root or if the function has multiple roots. It also requires the function to be differentiable, which may not be the case for some functions. Additionally, it can be computationally expensive for more complex functions.

5. How can I improve the performance of the Newton-Raphson method in Matlab?

To improve the performance of the Newton-Raphson method in Matlab, you can adjust the initial guess or use a different method if the function is not suitable for this approach. You can also try using a faster convergence criterion or parallelizing the code for faster execution.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
803
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
986
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Replies
16
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
Back
Top