MATLAB Setting up Newton Raphson integral with matlab

AI Thread Summary
The discussion centers on using the Newton-Raphson method to find the root of an equation involving an integral evaluated with the trapezoidal rule. The equation presented is 1 = e^{-cy} ∫_0^1 e^{-y(1-x)} dx. The initial confusion arises from the integration process, as the poster contemplates using symbolic computation but feels stuck. A participant suggests that the integral can be solved exactly, highlighting that y is treated as a constant during integration. This leads to an expression on the right-hand side that can be easily manipulated for applying Newton's method. The original poster acknowledges their misunderstanding and indicates they will have further questions later.
Moly
Messages
20
Reaction score
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:
1 = e^{-cy} \int_0^1 e^{-y(1-x)} dx

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
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.
 
Thanks Gib.
I figured where i went wrong.. i still have a question that i will post later today
 

Similar threads

Replies
2
Views
3K
Replies
4
Views
2K
Replies
2
Views
3K
Replies
4
Views
3K
Replies
7
Views
1K
Back
Top