Can Newton's method work with an approximated integral

In summary, the problem is that Newtons method no longer converges when I add this equation to the system. The other issue is that I am not sure how to integrate the equation.
  • #1
fahraynk
186
6
I have a system of equations, and one of them is this : ##\int(1-U(y))Dy - H*\int(U(y)-U(y)^2)dy=0##
Can Newtons method work if I approximate this integral to be ##\sum_y(1-U(y))-H\sum(U(y)-U(y)^2)=0##

y is a set integers in range ##[1,1000]##

I have Newtons method working for this same system without this equation, but I am trying to solve for a new variable (a), so I added this equation and changed (a) from a constant to a new variable, but Newtons method no longer converges.
Could this be because I am using rectangle left rule to approximate the integral, and maybe rectangle left has too much error for Newtons method to work?
The other thing I can try is to take the derivative of both sides giving this equation ##1-U(y)-H(U(y)-U(y)^2=0##
The only problem with this is I would have to add this equation to every point on a grid, meaning it would be 1000 new equations for 1000 grid points instead of 1 equation. I would have to rewrite the whole algorithm, so I would rather use rectangle left rule if possible because it is much less coding.

Anyway, yeah, will Newtons method work with rectangle left rule like this?
 
Physics news on Phys.org
  • #2
What exactly do you want to determine? The first equation is a function of H (and U) only. You want to find H? It is a linear equation, you don’t need Newton (technically it works, and gives the exact answer in one step).

What are the integration limits of your integrals?

What does U(y)2 mean?
 
  • Like
Likes fahraynk
  • #3
fahraynk said:
I have a system of equations, and one of them is this : ##\int(1-U(y))Dy - H*\int(U(y)-U(y)^2)dy=0##
Can Newtons method work if I approximate this integral to be ##\sum_y(1-U(y))-H\sum(U(y)-U(y)^2)=0##

y is a set integers in range ##[1,1000]##

I have Newtons method working for this same system without this equation, but I am trying to solve for a new variable (a), so I added this equation and changed (a) from a constant to a new variable, but Newtons method no longer converges.
Could this be because I am using rectangle left rule to approximate the integral, and maybe rectangle left has too much error for Newtons method to work?
The other thing I can try is to take the derivative of both sides giving this equation ##1-U(y)-H(U(y)-U(y)^2=0##
The only problem with this is I would have to add this equation to every point on a grid, meaning it would be 1000 new equations for 1000 grid points instead of 1 equation. I would have to rewrite the whole algorithm, so I would rather use rectangle left rule if possible because it is much less coding.

Anyway, yeah, will Newtons method work with rectangle left rule like this?
What are ##H## and * ?
 
  • Like
Likes fahraynk
  • #4
mfb said:
What exactly do you want to determine? The first equation is a function of H (and U) only. You want to find H? It is a linear equation, you don’t need Newton (technically it works, and gives the exact answer in one step).

What are the integration limits of your integrals?

What does U(y)2 mean?

Firstly, thank you for your reply. I tried to not input the nuts and bolts of the problem because I doubt anyone has time to get into it, so I figured I would just ask if rectangle left rule would mess up Newtons method.

Anyway, If you want the run down of my problem, I am solving this equation ##f'''+\frac{1+a}{2}ff''+a(1-f'^2)=0##
I break the equation into 3 equations like so :
$$
f_p-f'=0\\\\
f_{pp}-f''=0\\\\
f_{pp}'+\frac{1+a}{2}ff_p+a(1-f_p^2)=0$$

Then, I have a line in the y direction that I break into a grid of 1000 points on the line. I solve the 3 equations at every point on the line, and I have 3 boundary conditions. I also change the three equations to their taylor expansions. The total system is 3000 equations, 3003 unknowns, 3 boundary conditions.

The variable 'a' is something that in the past I set manually. I set G(x) to be the sum all of the 3000 equations and 3 boundary conditions into one equation since each equals zero (superposition principal).
X is a vector of all the 3003 variables
and if I plug the above system into a Newtons iteration (x=x-Jacobean^-1 * G(x)) it solves for X vector such that G(x) = 0 after about 8 iterations.

Where I am having trouble :
rather than defining the variable 'a' randomly, I am supposed to add it to the vector of variables X. I am also given a new equation that in theory is supposed to help me solve the system with 'a' as a variable :
The new equation :
$$\frac{\int 1-f_p(y) dy}{\int f_p(y)-f_p(y)^2dy}=H$$ H is a known constant. F, Fp, Fpp are functions of y.

I rearrange that equation, setting it equal to 0.
Now I think I have three options :
one : Approximate the integrals using rectangle left rule or rectangle middle rule.
Two : take the derivative of both sides to get : ##1-f_p - H(f_p-f_p^2)=0##
Three : integrate the integrals (I'm not sure how to do this)

I tried the rectangle left rule, adding 1 equation to G(x), adding the variable 'a' to G(x), and updating the Jacobean matrix with the new variable, the problem did not converge. I assumed it was error so I asked here.
Tonight, I tried the second option (taking the derivative of both sides). This gave me a new equation, which I applied to EVERY point on the grid (1000 points = 1000 equations). Then I updated the jacobean, adding 1000 new equations to the jacobean.
This also did not converge, but hovered around 0.
I am not sure if the second method makes sense because I now have 4003 equations summed in G(x) with 3004 unknowns. It may have not converged due to minor errors in the code though.
 
  • #5
WWGD said:
What are ##H## and * ?
H is a constant, * is just multiply operation (2*3=6)
 
  • #6
This “new equation” is missing limits to be well-defined (see my previous post).
Who gave you that equation?

You cannot determine boundary conditions just from your differential equation. You need some other input. What do you know in terms of initial conditions? Where do you want to find f?

Did you try to plug in a suitable exponential function? Plus some additional constant probably.

I don’t understand why you want to solve equations for 1000 y-values.
 
  • #7
mfb said:
This “new equation” is missing limits to be well-defined (see my previous post).
Who gave you that equation?

You cannot determine boundary conditions just from your differential equation. You need some other input. What do you know in terms of initial conditions? Where do you want to find f?

Did you try to plug in a suitable exponential function? Plus some additional constant probably.

I don’t understand why you want to solve equations for 1000 y-values.
I am solving for air flow above a flat plate at different heights.
The limits of that integral are 0 to y_max
I never tried an exponent because the function is non linear, and I am trying to learn to use Newtons method here anyway.
Boundary conditions are from physical intuition. Fp(0)=0, fpp(y=0)=0 at plate, Fp(y_max)=1
All the equations come from a pdf I found on the internet : https://learning-modules.mit.edu/se...d70a/link?errorRedirect=/materials/index.html
 

FAQ: Can Newton's method work with an approximated integral

1. Can Newton's method be used to approximate integrals?

Yes, Newton's method can be used to approximate integrals. However, it is more commonly used to find roots of equations.

2. How does Newton's method work for approximating integrals?

Newton's method approximates an integral by using a series of tangent lines to estimate the area under the curve. The more tangent lines used, the more accurate the approximation will be.

3. Is Newton's method more accurate than other methods for approximating integrals?

It depends on the function being integrated and the number of tangent lines used. In some cases, Newton's method may be more accurate, but in others, other methods such as the trapezoidal rule or Simpson's rule may provide more accurate results.

4. Can Newton's method work with any type of integral?

Yes, Newton's method can be used to approximate any type of integral, including improper integrals and multivariable integrals. However, the accuracy may vary depending on the complexity of the integral.

5. Are there any limitations to using Newton's method for approximating integrals?

One limitation of using Newton's method for approximating integrals is that it can be time-consuming and computationally intensive, especially for complex integrals. Additionally, it may not provide accurate results for all types of integrals.

Back
Top