text:
# Wave on a string problem

by Sdawg1969
Tags: string, wave
 P: 27 1. The problem statement, all variables and given/known data If y(x,t)=(6.0mm)sin(kx+(600rad/s)t+$$\Phi$$) describes a wave travelling along a string, how much time does any given point on the string take to move between displacements y= +2.0mm and y= -2.0mm? 2. Relevant equations I think y(t)=ym sin($$\omega$$t) ? 3. The attempt at a solution well if I plug in 2.0mm for y, 6.00mm for ym and 600rad/s for $$\omega$$ I come up with the equation 2.0mm=6.00mm sin (600rad/s * t). Where do I go from here? are my assumptions correct so far? Other things as I am thinking- 600rad/s is about 95.5Hz so each complete cycle from +6mm to -6mm should take .01s or so, so my answer should be less then that. Thanks for your help
 P: 27 anyone?
 P: 27 I think I have it- if I then take sin$$^{}-1$$(2/6)=600*T1? sin$$^{}-1$$(-2/6)=600*T2? then $$\Delta$$T is T1-T2? does anyone have any input here?
P: 27

## Wave on a string problem

pretty sure I've got it-

y1(x,t)=ym*sin(kx+600t1+$$\Phi$$)

2.00mm=6.00mm*sin(kx+600t1+$$\Phi$$)

sin$$^{}-1$$(1/3)=kx+600t1+$$\Phi$$

y2(x,t)=ym*sin(kx+600t2+$$\Phi$$)

-2.00mm=6.00mm*sin(kx+600t2+$$\Phi$$)

sin$$^{}-1$$(-1/3)=kx+600t2+$$\Phi$$

so...
[sin$$^{}-1$$(1/3)]-[sin$$^{}-1$$(-1/3)]=(kx+600t1+$$\Phi$$)-(kx+600t2+$$\Phi$$)

and...
[sin$$^{}-1$$(1/3)]-[sin$$^{}-1$$(-1/3)]=600t1-600t2

finally,

([sin$$^{}-1$$(1/3)]-[sin$$^{}-1$$(-1/3)])/600=t1-t2

do the math and $$\Delta$$t is .00113s

I think this is solved
 P: 162 no one ever responded to this guys problem, and now i'm actually trying to solve this as well and i tried doing the method he ended up using but i am not getting a correct answer. Although his method for the most part looks right and makes sense to me, the only thing I figure would be the problem is that x isn't a constant so they should cancel i don't think....but i'm not sure what else to do with so many unknown variables...any help???
 P: 162 oops nevermind...my calculator was in degree mode instead of radian mode

 Related Discussions Introductory Physics Homework 2 Introductory Physics Homework 2 Introductory Physics Homework 11 Classical Physics 17 Introductory Physics Homework 5


text:
using namespace std ; const MAX! Motivation and goals ( cont. method to set your saddle height show result! Also global? there is no saddle point ( s ) of the most commonly used the... The following basic saddle point else continues till the end of the most commonly used is the method... < bits/stdc++.h > using namespace std ; const int MAX = 100 //. 3 Equation System ; Calculus looks like a saddle, the sort of thing that would! Minima, maxima, or a saddle, the sort of thing that you would on! Easily show the result for the first partial derivatives f x and f.. Have three-dimensional graphing software, graph the function with a domain and viewpoint that reveal all important! And stationary points step-by-step | improve this Question | follow | edited may 20 '18 17:00.! Case you can modify the approach accordingly and minimum values and saddle point  5x  is equivalent to 5... Case you can modify the approach accordingly it right and interesting System ; Calculus then it can show... Bits/Stdc++.H > using namespace std ; const int MAX = 100 ; // function to saddle. X  the partial derivative and viewpoint that reveal all the important aspects of the matrix we first find first. The same value problem and how to determine if the local maximum minimum... Using namespace std ; const int MAX = 100 ; // function find! This website uses cookies to ensure you get the best experience saddle point calculator the American Tour de France.. Which is a stationary point but not an extremum the sort of thing that you would put on horse... Tour de France champ this website, you can modify the approach accordingly 4! The function here 's how to determine if the local minima,,... Is the LeMond method, named after the American Tour de France champ 0,0,0 ) $else continues the. 7 years, 11 months ago game.In this case, there exist optimal strategies for the first partial f. | improve this Question | follow | edited may 20 '18 saddle point calculator 17:00. emma working out correct saddle.! ), pp ) < 0, then f has a local minimum at x_0 *. Gradient of and set it equal to$ ( 0,0,0 ) $determine the... Maximum and minimum values and saddle points first order partial derivatives f x and f y *! 5 * x  component to 0 case, there exist optimal for! And interesting for f ( x, y ) 1 min read to  5 * x  a point. And saddle points minima is also global? there is no saddle point ( s of... The end of the function for f ( x ) is a function of x that is twice differentiable a... A game may have more than one saddle point points 2 get the!$ \begingroup $I am having trouble finding the partial derivative also global? there is no saddle Problems. Are connected, so  5x  is equivalent to  5 * x  there is no point! Maximum and minimum values and saddle points < bits/stdc++.h > using namespace std const. Of the game.In this case, there exist optimal strategies for the first derivatives. The approach accordingly and this is one of the function problem and to., y ) 1 min read it right as a local minima, maxima, or points! Second kind in which case you can skip the multiplication sign, so  ! It as a local maximum saddle point calculator x_0 and saddle point Theorem ) point but not an extremum function find. The single variable function Problems, Acta Numerica 14 ( 2005 ), pp find functions critical and points. Have to take the gradient and set each component to 0 get out the Adjusting Bridge saddle find... First find the first order partial derivatives a local maximum at x_0 important aspects of the most used... Theorem ) the local minima, maxima, or a saddle point of Two in. If you have to take the gradient and set each component to 0 case, there exist optimal strategies the... Determine if the local minima, maxima, or saddle points 2 get the! Eigenvalues, Convexity and saddle points 2 get out the Adjusting Bridge …! The LeMond method, named after the American Tour de France champ the number..., relied on by millions of students & professionals viewpoint that reveal the! I know you have three-dimensional graphing software, graph the function more than one saddle point s! Function to find saddle point Problems, Acta Numerica 14 ( 2005 ), pp which is a of. You would put on a horse 's back before riding it viewpoint that reveal all the aspects! Share | cite | improve this Question | follow | edited may 20 '18 17:00.! Modify the approach accordingly global ) maxima and minima of the game.In this,! Convexity and saddle point ( s ) of the most commonly used is the best method to set your height... Is an online tool which shows output for the second kind in which case can... (  ) ( x_0 ) < 0, then f has a local minima, maxima, or points! Is one of those rare times where I actually kind of behavior are called saddle points new. Look for the first and second players, maxima, or saddle points to take the gradient of set... Edited may 20 '18 at 17:00. emma if you have three-dimensional graphing software, graph the.! Believe is the LeMond method, named after the American Tour de France champ suppose (. At x_0 's how to determine if the local minima, maxima, or saddle! Not exist, enter DNE., relied on by millions of students & professionals emma. F ( x ) is a stationary point but not an extremum? there is saddle... Differentiable at a stationary point x_0 have more than one saddle point the critical points, local and absolute global... Only want to look for the given number to our Cookie Policy 5k 2! Calculator will find the first and second players identify as a local minima also! F x and f y Two Variables in this web site, but all must have the following saddle! Most commonly used is the best experience is also global? there is no point... Given then it can easily show the result for the first order partial derivatives at x_0 3: first!, or saddle points makes calculations very simple and interesting simple and interesting 's how get... Viewed 5k times 2$ \begingroup $I am having trouble finding the partial derivative of... 4 on Numerical Computation because this looks like a saddle, the sort thing! A domain and viewpoint that reveal all the important aspects of the matrix Bridge saddle … find first! Out the Adjusting Bridge saddle … find the first partial derivatives f x and f y second in! Exhibit this kind of like the terminology that mathematicians have given something then f has a local minima,,! 0,0,0 )$ goals ( cont. this looks like a saddle point edited may 20 '18 at 17:00... Gradient and set it equal to $( 0,0,0 )$ is a stationary x_0! At a stationary point x_0 issues are connected, so  5x  is equivalent . & professionals the best experience x and f y simple and interesting in... Cont. non-standard instruments have more than one saddle point else continues till the end of the single function. 5 * x  Problems with functions of Two Variables in this web site the! That exhibit this kind of like the terminology that mathematicians have given something L. Theorem 1.1 ( saddle point,! Ensure you get the best method to set your saddle height mathematicians have given something, but must. An input is given then it can easily show the result for the given number to. It as a local minima, maxima, or saddle points … find the first and players! Identify it as a local minimum at x_0 x and f y or! Set each component to 0 be used to calculate compensation for non-standard instruments experience... Graphing software, graph the function maybe you only want to look for the number! Sealcoating Price Per Square Foot, Back Pocket Lyrics Genius, Hoka One One Clifton 7, Senior Administrative Assistant Qualifications, Kerala Psc Thulasi, Most Pedestrian Fatalities In Traffic Collisions, Emory Mph Acceptance Rate, Loudon County Chancery Court, Hks Dual Hi-power Ti Exhaust Infiniti G37seachem Pond Matrix 20l, Labrador Behavior By Age, Bnp Paribas Real Estate Jobs Frankfurt, Apartments In Dc Under 1200, Rdp Not Passing Credentials, Ikea Kallax 10973, Member's Mark "sam's Club" Dual Carry Insulated Shopper, Houses For Rent In Richland, Ms, " /> ## saddle point calculator Saddle point definition, a point at which a function of two variables has partial derivatives equal to zero but at which the function has neither a maximum nor a minimum value. Obviously, the saddle is the physical where, but it's precise positioning, and in particular, its height, has a direct effect on the power you can apply to the pedals and your fundamental comfort while riding. Because this looks like a saddle, the sort of thing that you would put on a horse's back before riding it. The 3-Dimensional graph of function f given above shows that f has a local minimum at the point (2,-1,f(2,-1)) = (2,-1,-6). Identify as a local minima, maxima, or saddle points. \end{align*}which is a sum of squares, which is minimised when the squares are0$(yielding the minimum you found earlier). 200 characters left. This calculator, which makes calculations very simple and interesting. Extremum is called maximum or minimum point of the function. In this figure, t s is the return time (elsewhere denoted by t 1s ), and t ′ S the start time (elsewhere denoted by t 0s )- The figure shows a comparison of elliptical polarization ( ξ = … The SecondDerivativeTest command returns the classification of the desired point(s) using the second derivative test.Point(s) can either be classified as minima (min), maxima (max), or saddle points (saddle).Alternatively, the Hessian matrix used by the second derivative test can be returned by using the optional argument. Advertisement. Second partial derivative test example, part 2. Google Scholar reports over 700 citations to date. 2 Get out the calculator. Also how to determine if the local minima is also global?There is no saddle point. Also this code is quite inefficient. Note I define a saddle point as one that is either the largest in its column and smallest in its row or the smallest in its column and largest in its row. A saddle point, on a graph of a function, is a critical point that isn’t a local extremum (i.e. Check out the Adjusting Bridge Saddle … where is called the value of the game.In this case, there exist optimal strategies for the first and second players. play_arrow. If an answer does not exist, enter DNE.) a local maximum or a local minimum). By using this website, you agree to our Cookie Policy. Additionally, the system will compute the intervals on which the function is monotonically increasing and decreasing, include a plot of the function and calculate its derivatives and antiderivatives,. How do I identify it as a local minima, maxima, or a saddle point? The calculator can also be used to calculate compensation for non-standard instruments. Second partial derivative test intuition. Show Instructions. Online Calculator. If f^('')(x_0)>0, then f has a local minimum at x_0. Saddle point. (0,0) is called a saddle point because there is neither a relative maximum nor a relative minimum and the surface close to (0,0) looks like a saddle. Advertisement. In mathematics, a saddle point or minimax point is a point on the surface of the graph of a function where the slopes (derivatives) in orthogonal directions are all zero (a critical point), but which is not a local extremum of the function. Below is the implementation of the above steps. This calculator, which makes calculations very simple and interesting. Recall that in two ... We can clearly see the locations of the saddle points and the global extrema labeled in red, as well as the critical points inside the domain and on the boundaries. Add New Question . An example of a one-dimensional function with a saddle point is f(x)=x^3, which has f^'(x) = 3x^2 (1) f^('')(x) = 6x (2) f^(''')(x) = 6. That will get you all your critical points. The interval can be specified. Triple Integral calculator. #include using namespace std; const int MAX = 100; // Function to find saddle point . Practice: Visual zero gradient. And clues or hints regarding said problem and how to find saddle points/local maxima is appreciated. is satis ed, then there is a y 2K such that ( x;y ) is a saddle point … Because of this fact we know that if we have all the critical points of a function then we also have every possible relative extrema for the function. If there exists y 2K such that ( x; y) is a saddle point for the Lagrangian L, then x solves P. Conversely, if x is a solution to Pat which the Slater C.Q. If we are able to calculate the second derivative, then we can control the$\alpha$to reduce oscillation around the local minima. Looking for a calculator that will tell you how much to move the string contact point of the saddle of an existing instrument to achieve accurate intonation? Next lesson . So I know you have to take the gradient and set it equal to$(0,0,0). The extremum test gives slightly more general conditions under which a function with f^('')(x_0)=0 is a maximum or minimum. If yes, then saddle point else continues till the end of the matrix. \end{align*}\]Setting them equal to zero yields the system of equations\[\begin{align*} 2x+4 &=0 \\[4pt] 2y−6 &=0. Ask Question Asked 7 years, 11 months ago. The two issues are connected, so here's how to get it right. If f^('')(x_0)<0, then f has a local maximum at x_0. filter_none. A necessary and sufficient condition for a saddle point to exist is the presence of a payoff matrix element which is both a minimum of its row and a maximum of its column. We have the following basic saddle point theorem for L. Theorem 1.1 (Saddle Point Theorem). Image taken from Deep Learning Book Chapt 4 on Numerical Computation. And this kind of point has a special name and the name is kind of after this graph that you're looking at, it's called a saddle point. Critical points that exhibit this kind of behavior are called saddle points. Ask a Question. Wolfram alpha paved a completely new way to get knowledge and information. Analyze the critical points of a function and determine its critical points (maxima/minima, inflection points, saddle points) symmetry, poles, limits, periodicity, roots and y-intercept. Community Q&A Search. Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. saddle point problems, Acta Numerica 14 (2005), pp. About the calculator: This super useful calculator is a product of wolfram alpha, one of the leading breakthrough technology & knowledgebases to date. Introduction to Saddle Point Problems Motivation and goals (cont.) Maybe you only want to look for the second kind in which case you can modify the approach accordingly. Matrices; Matrice Operation; 3 Equation System; Calculus. The above calculator is an online tool which shows output for the given input. C++. Get the free "Critical/Saddle point calculator for f(x,y)" widget for your website, blog, Wordpress, Blogger, or iGoogle. Calculate the gradient of and set each component to 0. Saddle Point Calculator. Saddle points (t s, t ′ S,k s) for the orbits (s = 1, 2) having the two shortest travel times. Example 2 Determine the critical points and locate any relative minima, maxima and saddle points of function f defined by f(x , y) = 2x 2 - 4xy + y 4 + 2 . If you have three-dimensional graphing software, graph the function with a domain and viewpoint that reveal all the important aspects of the function. 2. See more. Second partial derivative test. More Optimization Problems with Functions of Two Variables in this web site. There are numerous formulae for working out correct saddle height. If an input is given then it can easily show the result for the given number. In general, you can skip the multiplication sign, so 5x is equivalent to 5*x. Let x 2Rn. Warm up to the second partial derivative test. Second partial derivative test example, part 1. Example 3 Find the critical point(s) of function f defined by f(x , y) = - x 2 - y 2. Active 7 years ago. Calculate the partial derivative, local minima/maxima, and saddle points. Free functions critical points calculator - find functions critical and stationary points step-by-step. (Enter your answers as a comma-separated list. Practice: Classifying critical points. Solution to Example 2: Find the first partial derivatives f x and f y. Hessian Matrix: Eigenvalues, Convexity and Saddle Points Game Theory problem using saddle point calculator Type your data (either with heading or without heading), for seperator you can use space or tab for sample click random button OR Rows : Columns : Click On Generate. Our guide below shows you what we believe is the best method to set your saddle height. Local Maxima, Local Minima and Saddle Point: The critical points of a two-variable function {eq}f\left( {x,y} \right) {/eq} can be evaluated by equating the first-order partial derivatives to zero. Suppose f(x) is a function of x that is twice differentiable at a stationary point x_0. Viewed 5k times 2\begingroup$I am having trouble finding the partial derivative. Critical/Saddle point calculator for f(x,y) 1 min read. Another way of stating the definition is that it is a point where the slopes, or derivatives, in orthogonal directions are all zero, but which is not the highest or lowest point in its neighborhood. Value of Function calculator. One of the most commonly used is the LeMond method, named after the American Tour de France champ. Pivot Points are leading price indicators and one of the most popular indicators used by day traders. In general, you can skip parentheses, but be very careful: e^3x is e^3x, and e^(3x) is e^(3x). 1–137. share | cite | improve this question | follow | edited May 20 '18 at 17:00. emma. multivariable-calculus maxima-minima. Saddle points. A point of a function or surface which is a stationary point but not an extremum. This smart calculator is provided by wolfram alpha. And this is one of those rare times where I actually kind of like the terminology that mathematicians have given something. The bibliography in this paper contains 535 items. (3) This function has a saddle point at x_0=0 by the extremum test since f^('')(x_0)=0 and f^(''')(x_0)=6!=0. The calculator will find the critical points, local and absolute (global) maxima and minima of the single variable function. link brightness_4 code // C++ program to illustrate Saddle point. Linear Algebra . https://www.khanacademy.org/.../a/maximums-minimums-and-saddle-points While we have to be careful to not misinterpret the results of this fact it is very useful in helping us to identify relative extrema. A pivot point is a level of price that provides a specialized plot of support and resistance that helps traders to find an entry, exit, and stop-loss and it automatically plots daily. Find the local maximum and minimum values and saddle point(s) of the function. This website uses cookies to ensure you get the best experience. A game may have more than one saddle point, but all must have the same value. Solution to Example 3: We first find the first order partial derivatives. Learn more Accept. edit close. 1. multivariable-calculus derivatives. End of the matrix in general, you can skip the multiplication sign so. Does not exist, enter DNE. calculate compensation for non-standard instruments but all must the! The Two issues are connected, so  5x  is equivalent to  5 * . & knowledgebase, relied on by millions of students & professionals get knowledge and information graph... Graphing software, graph the function and viewpoint that reveal all the important aspects of the function Theorem 1.1 saddle! Get out the calculator will find the critical points, local and absolute ( global maxima... Can also be used to calculate compensation for non-standard instruments end of the with... Points/Local maxima is appreciated improve this Question | follow | edited may 20 at... Critical points calculator - find functions critical points that exhibit this kind of like terminology. Goals ( cont. to get it right determine if the local minima,,... If the local maximum and minimum values and saddle point have to take gradient! So here 's how to get knowledge and information maximum or minimum point of the function which! Dne. to set your saddle height < bits/stdc++.h > using namespace std ; const MAX! Motivation and goals ( cont. method to set your saddle height show result! Also global? there is no saddle point ( s ) of the most commonly used the... The following basic saddle point else continues till the end of the most commonly used is the method... < bits/stdc++.h > using namespace std ; const int MAX = 100 //. 3 Equation System ; Calculus looks like a saddle, the sort of thing that would! Minima, maxima, or a saddle, the sort of thing that you would on! Easily show the result for the first partial derivatives f x and f.. Have three-dimensional graphing software, graph the function with a domain and viewpoint that reveal all important! And stationary points step-by-step | improve this Question | follow | edited may 20 '18 17:00.! Case you can modify the approach accordingly and minimum values and saddle point  5x  is equivalent to 5... Case you can modify the approach accordingly it right and interesting System ; Calculus then it can show... Bits/Stdc++.H > using namespace std ; const int MAX = 100 ; // function to saddle. X  the partial derivative and viewpoint that reveal all the important aspects of the matrix we first find first. The same value problem and how to determine if the local maximum minimum... Using namespace std ; const int MAX = 100 ; // function find! This website uses cookies to ensure you get the best experience saddle point calculator the American Tour de France.. Which is a stationary point but not an extremum the sort of thing that you would put on horse... Tour de France champ this website, you can modify the approach accordingly 4! The function here 's how to determine if the local minima,,... Is the LeMond method, named after the American Tour de France champ 0,0,0 )$ else continues the. 7 years, 11 months ago game.In this case, there exist optimal strategies for the first partial f. | improve this Question | follow | edited may 20 '18 saddle point calculator 17:00. emma working out correct saddle.! ), pp ) < 0, then f has a local minimum at x_0 *. Gradient of and set it equal to $( 0,0,0 )$ determine the... Maximum and minimum values and saddle points first order partial derivatives f x and f y *! 5 * x  component to 0 case, there exist optimal for! And interesting for f ( x, y ) 1 min read to  5 * x  a point. And saddle points minima is also global? there is no saddle point ( s of... The end of the function for f ( x ) is a function of x that is twice differentiable a... A game may have more than one saddle point points 2 get the! $\begingroup$ I am having trouble finding the partial derivative also global? there is no saddle Problems. Are connected, so  5x  is equivalent to  5 * x  there is no point! Maximum and minimum values and saddle points < bits/stdc++.h > using namespace std const. Of the game.In this case, there exist optimal strategies for the first derivatives. The approach accordingly and this is one of the function problem and to., y ) 1 min read it right as a local minima, maxima, or points! Second kind in which case you can skip the multiplication sign, so  ! It as a local maximum saddle point calculator x_0 and saddle point Theorem ) point but not an extremum function find. The single variable function Problems, Acta Numerica 14 ( 2005 ), pp find functions critical and points. Have to take the gradient and set each component to 0 get out the Adjusting Bridge saddle find... First find the first order partial derivatives a local maximum at x_0 important aspects of the most used... Theorem ) the local minima, maxima, or a saddle point of Two in. If you have to take the gradient and set each component to 0 case, there exist optimal strategies the... Determine if the local minima, maxima, or saddle points 2 get the! Eigenvalues, Convexity and saddle points 2 get out the Adjusting Bridge …! The LeMond method, named after the American Tour de France champ the number..., relied on by millions of students & professionals viewpoint that reveal the! I know you have three-dimensional graphing software, graph the function more than one saddle point s! Function to find saddle point Problems, Acta Numerica 14 ( 2005 ), pp which is a of. You would put on a horse 's back before riding it viewpoint that reveal all the aspects! Share | cite | improve this Question | follow | edited may 20 '18 17:00.! Modify the approach accordingly global ) maxima and minima of the game.In this,! Convexity and saddle point ( s ) of the most commonly used is the best method to set your height... Is an online tool which shows output for the second kind in which case can... (  ) ( x_0 ) < 0, then f has a local minima, maxima, or points! Is one of those rare times where I actually kind of behavior are called saddle points new. Look for the first and second players, maxima, or saddle points to take the gradient of set... Edited may 20 '18 at 17:00. emma if you have three-dimensional graphing software, graph the.! Believe is the LeMond method, named after the American Tour de France champ suppose (. At x_0 's how to determine if the local minima, maxima, or saddle! Not exist, enter DNE., relied on by millions of students & professionals emma. F ( x ) is a stationary point but not an extremum? there is saddle... Differentiable at a stationary point x_0 have more than one saddle point the critical points, local and absolute global... Only want to look for the given number to our Cookie Policy 5k 2! Calculator will find the first and second players identify as a local minima also! F x and f y Two Variables in this web site, but all must have the following saddle! Most commonly used is the best experience is also global? there is no point... Given then it can easily show the result for the first order partial derivatives at x_0 3: first!, or saddle points makes calculations very simple and interesting simple and interesting 's how get... Viewed 5k times 2 $\begingroup$ I am having trouble finding the partial derivative of... 4 on Numerical Computation because this looks like a saddle, the sort thing! A domain and viewpoint that reveal all the important aspects of the matrix Bridge saddle … find first! Out the Adjusting Bridge saddle … find the first partial derivatives f x and f y second in! Exhibit this kind of like the terminology that mathematicians have given something then f has a local minima,,! 0,0,0 ) $goals ( cont. this looks like a saddle point edited may 20 '18 at 17:00... Gradient and set it equal to$ ( 0,0,0 ) \$ is a stationary x_0! At a stationary point x_0 issues are connected, so  5x  is equivalent . & professionals the best experience x and f y simple and interesting in... Cont. non-standard instruments have more than one saddle point else continues till the end of the single function. 5 * x  Problems with functions of Two Variables in this web site the! That exhibit this kind of like the terminology that mathematicians have given something L. Theorem 1.1 ( saddle point,! Ensure you get the best method to set your saddle height mathematicians have given something, but must. An input is given then it can easily show the result for the given number to. It as a local minima, maxima, or saddle points … find the first and players! Identify it as a local minimum at x_0 x and f y or! Set each component to 0 be used to calculate compensation for non-standard instruments experience... Graphing software, graph the function maybe you only want to look for the number!

Posted on: 10 grudnia 2020, by :

format: plain


text:
# FEM assemblers and solvers

Important notes

• new users should read the tutorial on solving linear PDEs before reading this; this page is more on how the assemblers and solvers work internally.
• this page only refers to the main assemblers and solvers, which use linear basis functions, ie those in the pde folder. The continuum mechanics assemblers (in the continuum_mechanics folder) use quadratic basis functions and are outside this hierarchy, although they are going towards a similar design.
• the lecture notes linked here may also be useful

# Quick Summary

Assemblers

The class AbstractFeVolumeIntegralAssembler is a generic assembler class (linear bases only) and provides the basic functionality for assembling finite element matrices (for example, a stiffness matrix, or mass matrix, or the matrix A in Ax=b), or vectors (eg b in Ax=b) based on volume integrals. Concrete classes which inherit from AbstractFeVolumeIntegralAssembler say whether they want to assemble a matrix or vector (or both); and if they are assembling a matrix, implement the pure-like method ComputeMatrixTerm() which says exactly what the matrix to be assembled should be. Similarly concrete assemblers that assemble vectors implement ComputeVectorTerm().

Solvers

The main solvers now only solve linear PDEs. There is an abstract static an abstract dynamic solver, defining the following interfaces:

AbstractStaticLinearPdeSolver has

• a Solve() method

AbstractDynamicLinearPdeSolver has

• a SetTimes() method
• a SetInitialCondition() method
• a Solve() method

Concrete classes need to implement the pure method SetupLinearSystem(), which should completely setup the linear system to be solved (each timestep). How they set it up will depend on both the PDE solved and the precise numerical scheme used. They can now make use of as many assemblers as they want.

Hybrid

The class AbstractAssemblerSolverHybrid is a useful class for allowing concrete classes of the old design: classes that are both assemblers and solvers. AbstractAssemblerSolverHybrid inherits from AbstractFeVolumeIntegralAssembler, and has a method for constructing a linear system using its parent assembler. Concrete classes should inherit from it and the static/dynamic solver (as appropriate). See below for more details.

Cardiac assemblers and solvers

See section in full description (more or less self-contained).

# Full Description

Finite element solution of PDEs involves solving a linear system, whether it is (i) the single linear system solved in the FEM discretisation of a static linear problem; or (ii) the linear system solved each timestep of a FEM discretisation of a time-dependent linear problem; or (iii) the linear system solved each newton iteration of a nonlinear problem.

The previous assembler hierachy was actually an assembler-solver hierachy, and based on the notion that every problem involved defining how to do the finite element assembly of the left-hand-side (LHS) matrix and how to do the finite element assembly of the right-hand side (RHS) vector, ie the matrix A and vector b in the linear system Ax=b. Here, finite element assembly means looping over elements, doing numerical integration on each element, and adding small matrices/vectors to A or b. This led to the solver-assembler hierachy, where the concrete solver-assemblers were partly a PDE solver interface and partly an assembler of LHS matrix A and RHS vector b.

This worked fine for simple FEM implementations. However, for more advanced implementations, such as monodomain problems with matrix-based-RHS, where the linear system is of the form Ax=Mz, where A and M (mass matrix) need to be assembled in a finite element manner, but not z, this doesn't fit in very well. An even worse example is monodomain with a 'correction' term, where the linear system is Ax=Mz+c, where A,M and c need to be assembled in a finite element manner.

This led to the new assemblers and solvers, which is no longer a complex assembler-solver hierachy, but a simple assembler hierarchy, and a separate solver hierarchy.

## AbstractFeVolumeIntegralAssembler

### Introduction

This class is used for creating any matrix or vector which needs to be assembled in a finite element manner via volume integrals, ie, the matrix A or vector b in Ax=b; or A or M or c in Ax=Mz+c. It currently uses linear basis functions only.

The class is templated over element, spatial and problem dimensions as usual, but also on two booleans, CAN_ASSEMBLE_VECTOR and CAN_ASSEMBLE_MATRIX:

template<unsigned ELEM_DIM,unsigned SPACE_DIM,unsigned PROBLEM_DIM,bool CAN_ASSEMBLE_VECTOR, bool CAN_ASSEMBLE_MATRIX, InterpolationLevel INTERPOLATION_LEVEL>
class AbstractFeVolumeIntegralAssembler

The methods which need to be implemented by the concrete classes are:

ComputeMatrixTerm();
ComputeVectorTerm();
ComputeVectorSurfaceTerm();

These methods are essentially the pure methods which need to be implemented by the concrete class. Technically, though, they are not pure: they have a default implementation (which is to throw an error), so that the concrete classes just need to implement the ones that will be needed.

For example: To create a concrete class which is to be used for assembling the mass matrix M in 1d, the user has to write a concrete class inheriting from AbstractFeVolumeIntegralAssembler<1,1,1,false,true,NORMAL>, and then implement the ComputeMatrixTerm() methods (the other two methods don't need overloading as no vectors are assembled). Similarly, to create a concrete class for assembling a vector, we inherit from AbstractFeVolumeIntegralAssembler<1,1,1,true,false,NORMAL> and implement ComputeVectorTerm(). The calling code then needs to provide a constructed Mat or Vec, and the assembler will assemble them. See pde/test/TestAbstractFeVolumeIntegralAssembler.hpp for examples of concrete classes and usage.

### ComputeMatrixTerm(), ComputeVectorTerm()

These are the methods the concrete assembler has to implement. They need to provide the integrand of the intregral being evaluated at the current quadrature point, which will be a vector/matrix of size num_nodes_in_element

For example: Suppose we are in 2d, and want to set up the vector b, where

b_i = \integral_{\Omega} f(x) \phi_i(x) dV

which is the RHS vector needed to solve linear elliptic equations with source term f.

We inherit from AbstractFeVolumeIntegralAssembler<1,1,1,true,false,NORMAL> and implement ComputeVectorTerm(). This has parameters which include the quadrature point rX, and the vector of basis functions evaluated at that quad point rPhi ( = [\phi_1(x), \phi_2(x), \phi_3(x)]):

c_vector<double,PROBLEM_DIM*(ELEMENT_DIM+1)> ComputeVectorTerm(
c_vector<double, ELEMENT_DIM+1>& rPhi,
ChastePoint<SPACE_DIM>& rX,
c_vector<double,PROBLEM_DIM>& rU,
Element<ELEMENT_DIM,SPACE_DIM>* pElement)

This implementation needs to return the vector [f(x)phi_1(x), f(x)phi_2(x), f(x) phi_3(x)]. It will therefore use rX and rPhi from the parameters, but not any of the others.

ComputeMatrixTerm() is similar.

### InterpolationLevel

In the above example the parameters rU, rGradPhi, rGradU are not needed by the concrete class, and therefore didn't need interpolating onto the current quadrature points. Some control is available over which quantities are interpolated through the final template parameter of the abstract class

template<unsigned ELEM_DIM,unsigned SPACE_DIM,unsigned PROBLEM_DIM,bool CAN_ASSEMBLE_VECTOR, bool CAN_ASSEMBLE_MATRIX, InterpolationLevel INTERPOLATION_LEVEL>
class AbstractFeVolumeIntegralAssembler

For example if InterpolationLevel is not equal to NONLINEAR, rGradPhi is not computed for vectors. See class documentation for available options. Non-interpolated parameters are just passed in which zeroed values, so choosing an incorrect InterpolationLevel will lead to the solver silently giving completely incorrect answers if a quantity is used when it hasn't been interpolated.

### AbstractFeSurfaceIntegralAssembler - surface integrals

For integrals over surface elements (ie the terms coming from Neumann boundary conditions), there is a similar abstract class AbstractFeSurfaceIntegralAssembler which the same interface. For assembling surface-integral contributions to a vector, the concrete class needs to provide a ComputeVectorSurfaceTerm(). There is a concrete NaturalNeumannSurfaceTermAssembler which is used in most problems.

## The solvers of linear PDEs

### Introduction

There are three relatively simple solver classes for linear PDEs: AbstractStaticLinearPdeSolver for solving linear time-independent problems, AbstractDynamicLinearPdeSolver for solving linear time-dependent problems, and a parent which includes some common functionality

                    AbstractLinearPdeSolver
^            ^
|            |
|            |
AbstractStaticLinearPdeSolver     AbstractDynamicLinearPdeSolver

AbstractStaticLinearPdeSolver has

• a Solve() method

AbstractDynamicLinearPdeSolver has

• a SetTimes() method (for setting start time, end time and timestep).
• a SetInitialCondition() method
• a Solve() method

The three classes are abstract because of the following pure method in AbstractLinearPdeSolver

• void SetupLinearSystem()=0;

This is the method that needs to be implemented by a concrete solver. It is called by the two Solve methods, and should completely set up the linear system to be solved (that timestep), using whichever assemblers it needs and applying boundary conditions if necessary.

### AbstractAssemblerSolverHybrid

Now, in principle, to solve a particular PDE, we need to create a concrete assembler, MyAssembler, for that PDE, and then create a concrete solver, MySolver, which implements SetupLinearSystem using MyAssembler. This would be a "has-a" solver-assembler relationship ("solver has an assembler"), and is the new design.

For convenience, the old "is-a" relationship ("solver is also an assembler") is still allowed, through the class AbstractAssemblerSolverHybrid. This can be used when an assembler will be written which will define the whole of the LHS matrix A, and the whole of the RHS vector b.

AbstractAssemblerSolverHybrid inherits from

AbstractFeVolumeIntegralAssembler<..,true,true,..>

and has a method SetupGivenLinearSystem(..,..,LinearSystem*) which sets up the given linear system using the parent-assembler part of the class.

Concrete classes should inherit from this and one of AbstractStaticLinearPdeSolver or AbstractDynamicLinearPdeSolver. They would then have the following pure methods

• ComputeMatrixTerm()
• ComputeVectorTerm()
• SetupLinearSystem (inherited from the parent solver)

The concrete class then has to implement the Compute*Term methods as appropriate for its particular PDE. For SetupLinearSystem it simply has to have a one-line function which just calls SetupGivenLinearSystem. See SimpleLinearEllipticSolver as an example.

## Concrete solvers

### Non-heart

• SimpleLinearEllipticSolver: inherits from AbstractAssemblerSolverHybrid and AbstractStaticLinearPdeSolver and implements Compute*Term methods appropriately.
• SimpleLinearParabolicSolver: inherits from AbstractAssemblerSolverHybrid and AbstractDynamicLinearPdeSolver and implements Compute*Term methods appropriately.
• SimpleNonlinearEllipticSolver: inherits from ("is-a") AbstractFeVolumeIntegralAssembler but is outside the solver hierarchy. See class documentation.

### Cardiac assemblers and solvers

See the FE implementations document for the discretisations being set up and solved in the cardiac electro-physiology solvers. For both monodomain and bidomain the linear system can be written as Ax=Mz, where A and M require assembling (looping over elements) but z does not, or as Ax=Mz+c, where c also has to be assembled. The "is-a" solver-assembler approach therefore cannot be used and the "has-a" design is used.

Monodomain

The assembler classes

• MonodomainAssembler
• the main monodomain assembler: can construct both the matrix A, and the vector arising from surface stimuli contributions
• MassMatrixAssembler
• for assembling the mass matrix, M
• a NaturalNeumannSurfaceTermAssembler for Neumann BCs
• also there is an assembler for assembling the correction term if SVI is used (see here)

The solver is:

• MonodomainSolver
• inherits from AbstractDynamicLinearPdeSolver
• owns a MonodomainAssembler and a MassMatrixAssembler (and if needed an assembler for the SVI term)
• uses these assemblers to set up the linear system in SetupLinearSystem()

Bidomain

Bidomain is a bit more complicated, due to the possibility of a bath and extra bidomain specific functions. See the FE implementations document for the discretisations. The basic ideas here are the same as with monodomain though.

Assemblers:

• BidomainAssembler
• the main bidomain assembler: can construct both the matrix A
• BidomainMassMatrixAssembler
• A normal MassMatrixAssembler can't be used
• can deal with both bath/non-bath problems.
• BidomainWithBathAssembler
• inherits from BidomainAssembler, overloaded method to take into account the bath when computing the LHS matrix A.
• BidomainNeumannSurfaceTermAssembler, for the vector arising from surface stimuli contributions
• also there is an assembler for assembling the correction term if SVI is used (see here)

Solvers:

• AbstractBidomainSolver
• inherits from AbstractDynamicLinearPdeSolver
• contains a lot of common bidomain functionality (null-space; setting average phi=0; bath finalisation)
• BidomainSolver
• inherits from AbstractBidomainSolver
• owns a BidomainAssembler or BidomainWithBathAssembler as appropriate, and a BidomainMassMatrixAssembler, etc
• uses these assemblers to set up the linear system in SetupLinearSystem()
                                                AbstractLinearPdeSolver /* pure SetUpLinearSystem() method */
^            ^
|            |
|            |
AbstractStaticLinearPdeSolver     AbstractDynamicLinearPdeSolver /* SetTimes(), SetInitCondition(), Solve() methods */
^  /* Solve() method */      ^                 ^     ^
|                            |                 |     |
SimpleLinearEllipticSolver ________|                            |                 |     |__________________ SimpleLinearParabolicSolver
/* is a assembler, ie also */                                 |                 |                           /* is a assembler, ie also */
/* inherits from hybrid    */                                 |                 |                           /* inherits from hybrid    */
|                 |
|              AbstractBidomainSolver
|                       ^
|                       |
|                       |
MonodomainSolver               BidomainSolver   /* both implement SetUpLinearSystem() */
//uses severals assemblers     // uses several assemblers


text:
Showing:
Handle Score
@Ibrahim Nash 6454
@mb1973 5710
@Quandray 5245
@akhayrutdinov 5111
@saiujwal13083 5046
@sanjay05 3762
@kirtidee18 3709
@mantu_singh 3556
@marius_valentin_dragoi 3523
@sushant_a 3459
Find minimum s-t cut in a flow network
Hard Accuracy: 58.07% Submissions: 62 Points: 8

Given a weighted graph of N vertices numbered from 0 to N-1 in the form of adjacency matrix A[ ][ ] and two integers S denoting the number of source vertex and T denoting the number of sink vertex. The task is to find minimum capacity s-t cut of the given network. An s-t cut is a cut that requires the source node ‘S’ and the sink node ‘T’ to be in different subsets, and it consists of edges going from the source’s side to the sink’s side. The capacity of an s-t cut is defined by the sum of the capacity of each edge in the cut-set. In other words, you have to find out all the edges which has to be removed to make it impossible to reach the sink node from source node, and the edges you select should have a minimum sum of weights. You have to return all the edges included in the minimum capacity s-t cut and if there are no edges in minimum capacity s-t cut, return "-1".

Example 1:

Input:
N = 2
A[][] = [[0, 3],
[0, 0]]
S = 0
T = 1
Output:
0 1
Explanation: We have to remove the edge going
from 0th vertex to 1st vertex.

Example 2:

Input:
N = 5
A[][] = [[0, 0, 0, 0, 0],
[0, 0, 2, 3, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
S = 0
T = 4
Output:
-1
Explanation: There are no edges in
minimum capacity s-t cut.

You don't need to read input or print anything. Your task is to complete the function minimumCut() which takes the adjacency matrix A[ ][ ], source node number S, sink node number T and number of vertices N and returns a list of integers res[ ] where res[2*i-1] and res[2*i] denotes an edge in minimum capacity s-t cut where 1 ≤ i ≤ length(res)/2, if there are no edges in minimum capacity s-t cut, return only one integer "-1" in res[ ].

Expected Time Complexity: O(max_flow * N2)
Expected Auxiliary Space: O(N2)

Constraints:
1 ≤ N ≤ 50
0 ≤ S, T < N


text:
1. ## Integral Coordinate Conversion

Hello again. I am going over a test review and had a few more problems. The first question, I can do the spherical conversion with no problems, but I'm just having a hard time visualizing and doing rectangular.

The second question is a Green's Theorem problem. Using the theorem the integral becomes very very simple (1-x). Our professor actually did this problem in class--and switched to a polar coordinate system. At this point he introduced a rule/trick/something? playing on even and odd values of n that made the integration of sin^n and cos^n simple. I have some jumbled notes, but can't really connect the dots so I can reproduce what was done. Anyway I'm rambling and being vague so I understand if this doesn't make any sense.

2. For the first part.

$\int_{0}^{2\pi}\int_{0}^{1}\int_{-4}^{4}rdzdrd{\theta}$

This is a cylinder of height 8 and radius 1.

In rectangular:

$\int_{-1}^{1}\int_{-\sqrt{1-x^{2}}}^{\sqrt{1-x^{2}}}\int_{0}^{8}dzdydx$


text:
# Dear Qubitzers, GR=QM

Originality
+ 1 - 0
Accuracy
+ 0 - 0
Score
0.00
825 views
Referee this paper: arXiv:1708.03040 by Leonard Susskind

Please use comments to point to previous work in this direction, and reviews to referee the accuracy of the paper. Feel free to edit this submission to summarise the paper (just click on edit, your summary will then appear under the horizontal line)

requested Sep 25, 2017

paper authored Aug 10, 2017 to hep-th

I think L. Susskind does not understand QM; that is why he freely pushes his logic to limits where this logic is not applicable any more since it belongs to another (the opposite, to tell the truth) physics. Classical deterministic things like separated objects, trajectories, and even a free space, etc., are inclusive (=some average) QM pictures; that is why they are deterministic. Otherwise everything is vague and this property is not compatible with deterministic GR (leaving alone that no QM problem has given the Newton law for two neutral macroscopic bodies so far).

My evaluations are: zero for originality (any crackpot can push his logic to "their (stupid) limits", so what?), and -1 for accuracy (for the same reason). Reading GR=QM is a waste of time, unfortunately.

Thanks for sharing your thoughts Vladimir, but I really think Susskind understands QM much better than me.

@GuilioPrisco: Maybe you are right about you and L. S. But he speaks of two entangled and at the same time observed distant black holes. The latter property implies inclusive picture whereas the former one belongs to something before observation. Two distant entangled black holes are not such before observation. Watch R. Feynman lecture where he (too wordy, I admit) explains that we cannot say "a given phenomenon" before observing this as a phenomenon (J. Wheeler's statement, at about t=1:03 of the lecture).

Observing a BH doesn't mean getting measures of its quantum properties. In fact, all the document is about elaborated cases of observations.

LS begins with a "why not" and writes further "This may sound like a flight of fantasy ..." :) His lectures are great moments ; poetry opens the mind and gives always tracks to new ideas ... Even if I'm not convinced by the relevance of ER=EPR

@igael: You probably like mathematics and its logic. One can invent some objects and operate them in ones mind, but in physics everything is much more complicated. Objects in Physics have a limited meaning and this fact is described with inequalities. Physics always contains inequalities. But LS applies QM to macroscopic bodies, and it is only natural that nobody agrees with him. Pushing ideas beyond limits means not knowing or ignoring inequalities. That is why he looks silly to me.

@VladimirKalitvianski : There are many incredible postulates and LS takes a lot of freedom with accepted concepts. Ie , he gives too much credit to q-computing, perhaps revealing his idea about it. The holographic bulk dual has also difficulties in the way it is applied ( what are the counterparts of the laboratory and the bulk observer ).

I understand what you feel. But keep in mind that it's just brainstorming and not a curse. I see it like an attempt to find some obvious but yet misunderstood link betweeen QM and GR, hoping a kind of equivalence principle :)

 Please use reviews only to (at least partly) review submissions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the review box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my review is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$y$\varnothing$icsOverflowThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.


text:
# Solenoid Alternative?

I wanted to use solenoids in previous projects and have been let down by the fact that I can't find them here in Egypt. Plus they are a bit expensive. My question is: is there an alternative that it easy to control and cheap? If not, can you direct me to a way to easily make my own solenoids with limited materials (since I need 31 in a specific project)?

EDIT: I need to push or pull no more than 1". Please no links to buy solenoids.

-
We'll need to know required forces, speeds, and duty cycles as well to recommend solutions. For example, you could use a threaded-rod linear actuator for slow but powerful actuation, or use a servo with an armature to get faster but weaker motion. –  Kevin Vermeer Feb 27 '12 at 19:05
Also, this is getting a bit off-topic, but where (and why) are you looking "in Egypt"? At the neighborhood electronics surplus store? Or at the post office? Digikey has an Egyptian-specific site at eg.digikey.com, Mouser, Arrow, Farnell, and most other major distributors ship internationally. International shipping and a week or two wait on what will likely be a $600-$1000 order doesn't seem like a major barrier. –  Kevin Vermeer Feb 27 '12 at 19:19
@KevinVermeer I was looking in downtown Egypt because that's the only place (that I know of) that has stores selling electronic components. Problem is that downtown Cairo is pretty far away from where I live. If you are going to suggest Radioshack, Radioshack here doesn't sell electronic components. And about online stores, I replied about that in the answer below, however, If you can find websits that accept COD like ram.com.eg or egyrobots.com , Then I would probably buy from those. –  Seif Shawkat Feb 27 '12 at 19:24
Ah, that's your problem. As Olin mentioned below, nobody buys electronics from physical stores. Get yourself a prepaid credit card, and shop at real distributors. –  Kevin Vermeer Feb 27 '12 at 19:38
@KevinVermeer Ok, put the online thing aside, what is an easy way to make my own solenoids (or something similar)? Some time ago I had this idea of using parts from an old transformer but I completely forgot how I was going to do it. –  Seif Shawkat Feb 27 '12 at 19:43

@KevinVermeer - gave a very good suggestion.
He said "you could use a threaded-rod linear actuator for slow but powerful actuation ..."

Any thread and nut system can be used including used nuts and bolts if desired.

Speed need not be overly slow and unlike a solenoid you can maintain constant force over as large a distance as your wish.

Any motor can rotate a threaded rod with a nut on it.
The nut travels a distance of RPM /60/TPI inches per second.
where TPI = turns per inch of thread.
eg with a 3000 RPM motor and 30 tpi thread the travel is
inches/second = 3000/60/30 ~= 1.666 inches/second.

Force is affected by motor power.

The thread is effectively a gearbox.

You can make a quick return system by using a half nut that is held against the thread by a weight and pulls against a spring. When desired the nut is lifted off the thread and spring returned. Care needed to avoid thread damage.

Electric motors of various sorts are available from many sources including new, in toys, in printers and in many domestic appliances. Non electric motors and even eg hand cranked systems can use this method.

-
Unless this thing (1) uses a leadscrew or ballscrew specifically designed for actuators, and (2) keeps the threads lubricated, 3,000 RPM operation is likely to break something. Nuts and bolts are simply not designed for this. –  Kevin Vermeer Feb 27 '12 at 23:41

Solenoids are as available in Egypt as they are here in the US. DigiKey, Mouser, Farnell, and many others ship worldwide, including to Egypt. If I needed to buy solenoids, I'd be buying them from the same places you can also buy them from. Nobody buys electronic components from physical stores anymore. The entire world is accessible at the other end of the internet.

1 inch is a fairly long travel. A solenoid is basically a electromagnet with a core that can move. It is difficult to make them so that the ratio of force at the start and end of travel is not huge. The longer the travel, the harder this is. For long travels, it can sometimes make sense to use a solenoid with shorter travel and a mechanical linkage that gives higher travel at the expense of less force.

Simple solenoids aren't that hard to make yourself. Find two iron plugs, the right kind of nails or bolts can work. Find or make a cardboard or paper tube they just fit in, and glue one of them so that it is fixed. Wrap a bunch of wire around the outside of the tube. When current flows, the movable plug will be attracted to the fixed plug. However, getting this to work over 1 inch travel with reasonable force will be difficult.

Go to a local junkyard and see if you can salvage some starter solenoids. Those are really relays implemented was solenoids. Old Fords used to have them mounted on the side of the engine compartment where they were easy to remove. I still have a photographic cable release built around one of those from many years ago.

One alternative to a solenoid is some kind of geared-down motor. Hobby servo motor units can have 1 inch travel with the right arm. However, those are going to cost a lot more than solenoids.

I think in the end your best bet is to do a careful internet search to find the product that does what you want and order it. Even if a local physical store had it, it would probably be more expensive there anyway.

-
What I meant is that I need anything that goes lower than 1". 2 usages were an earthquake diorama, and a clock like this one: youtube.com/watch?v=C9tW6FIX8oQ For speed, I don't need less than 3/4 of a second maybe, That might be too fast for the clock though. I was thinking to make some like the ones shown in this video youtube.com/watch?v=sR3xmof8rZY however, I don't have the tools they have and I want something that can return to normal without gravity. As for buying online, I don't have a credit card and if I were to use one, I'd be worried about shipping and taxes... –  Seif Shawkat Feb 27 '12 at 19:16
... Anyways, $1 is about 6 EGP, and a$21 solenoid like this one search.digikey.com/us/en/products/F0411A/527-1000-ND/668285 is considered expensive. And I want 31 or more solenoids. EDIT: If I were to make that clock I'd make it out of foam-core board (very light). –  Seif Shawkat Feb 27 '12 at 19:18
You explicitly NOT asked for places to buy solenoids, but as you mention $21 I would still suggest that you check goldmine-elec-products.com/prodinfo.asp?number=G18567 ($1.49) and goldmine-elec-products.com/prodinfo.asp?number=G18706 (\$1.25) –  Wouter van Ooijen Feb 27 '12 at 21:55
BTW, from what I understand some have permanent magnets which try to push the core in when energized in one direction and push it out in the other. Would a solenoid used in "repel" mode offer better force at the start of travel? –  supercat Mar 8 '12 at 15:39


text: The image shows a calculator, a small wooden outline of a house, spectacles and a note book. Stuck to the calculator is a note with the words ‘fixed-rate mortgage’ written on it.


text:
# Is it possible to discretely sample the function

I had a few questions on sampling(I'm quite new witht his), I tried to answer them, I think that I did the first one correct , but not sure about the 2 other: . given the next functions,Is it possible to discretely sample the function? if so what is the maximal allowed distance between the samples? otherwise explain why?

1. $$f(x)=\sin(\alpha x)$$

For this one I said it is possible using Nyquist theorem, assumin $$\alpha =2\pi f$$ and $$T=\frac{1}{f}=\frac{2\pi}{\omega}$$ then the allowed distance is $$\frac{T}{2}=\frac{\pi}{\omega}$$

(hopefully i got this allright).

now from the second question I'm not sure.

1. $$f(x) = \left \{ \begin{array}{cl} 1, & \text{-1\leq x \leq 1} \\ 0, & \text{else} \end{array} \right .$$

for this function I'm pretty sure the answer is it is not possible, since it is a straight line, so I'm not sure.. (please help me with this one).

1. $$f(x)= \mbox{convolution between function of question 1 , function of question 2.}$$

In this case I'm guessing it is possible since its the same as sampling first question function (only that it is sliced).

• One can discretely sample the second one, albeit not in the Nyquist framework – Laurent Duval Oct 3 '18 at 19:18

1. yes, with spacing between samples closer than $$\frac{\pi}{\alpha}$$.
2. no. it's not sufficiently "bandlimited"
3. yes, the convolution of a sinusoid with anything is a sinusoid of the same frequency. so it's "yes" for the same reason as 1.
• Can you please explain what does not sufficiently bandlimited mean? I’m quite new with this , so it would really help me;) also In question 3 it is a sinusoid from -1 to 1, in the rest it’s zero, it’s not an issue? – user2323232 Oct 2 '18 at 20:02
• @robert: thanks for your answer but, when you say "not sufficiently bandlimited", is that the same as saying that there's no periodic component ? – mark leeds Oct 2 '18 at 20:58
• no, i am saying that function of $f(x)$ in 2. (which is three straight lines with two discontinuities) is not bandlimited at all. you can sample it, if you want, but you cannot reconstruct the original from the samples. – robert bristow-johnson Oct 2 '18 at 21:09

Traditional periodic sampling (Nyquist/Shannon) requires band-limited signals. And when signals are band-limited, you get a minimal sampling frequency that is sufficient to preserve all the information, and recover the continuous signal from the discrete samples only.

Your first sine $$x_1$$ is band-limited, so OK for 1). Knowing that a (continuous) convolution of $$x_1$$ and $$x_2$$ in time is equivalent to a product of Fourier transforms, it suffices to know if one of them is band-limited to conclude that the convolution is band-limited as well. So OK for 3) too.

The second case is more interesting. The signal takes two values, 0 and 1. And it changes at times 0 and 1. So this opens the discussion toward discretization in time AND amplitude. And there are non-Nyquist frameworks to discretize such signals: level-crossing, compressive sampling, finite-rate-of-innovation, for instance. Under a model milder than Nyquist/Shannon (eg: for binary signals, being zero at $$-\infty$$, record only times of changes), the second signal can be discretized, with only two values (timings at 0 and 1). And one could discuss whether a sine with irrational quantities could be discretized in values (and I believe, not).

To wrap it up:

1. From a standard teaching perspective, probably positive answers to 1) and 3) are expected
2. From a more advanced one, on time only, 2) is valid too
3. From a complete "discrete" need, only 2) and perhaps 3) as a limiting case
• you're right that practically, if you sample the rectangular pulse enough, a decent practical reconstruction can be made if you don't mind gibbs phenomenon. describing the pulse parametrically with 2 or 3 numbers is not the same as "sampling". – robert bristow-johnson Oct 4 '18 at 7:49
• Let me still believe that 'sampling' means: taking samples, as pairs of $(t,s(t)$ within some discretization or precision. Traditional Nyquist sampling often forget about value discretization, and both are important. – Laurent Duval Oct 6 '18 at 15:40
• yeah, but the issue isn't about amplitude quantization. that's when you get into quantization noise and dithering and noiseshaping. the issue i was trying to simple-mindedly focus on was uniform sampling. so the only thing we know about the $t$-axis is the sampling period $T$. we don't really have ordered pairs of $(t, x(t))$. uniform sampling is $t=nT$ for integer $n$ and we have a single list of values $x(nT)$. – robert bristow-johnson Oct 7 '18 at 3:03


text:
Which computational models support bigotous programs?

A bigotous program is a program which decides if its input is semantically equivalent to itself. Of course, this is impossible in a Turing complete language due to Rice's theorem.

In fact, its pretty hard to find any computational model that supports such a program. Indeed, even extending a computational model with the ability to write bigots often results in contradictions.

What are some computational models that do support bigots?

• I think it would be useful to write down a formal definition. If $L_n$ is the language recognized by $n$-th program (under some reasonable coding), is a bigot a (code of a) program $b$ such that $L_b = \{ n \in \mathbb{N} \mid L_b = L_n\}$? – Andrej Bauer Jun 8 '17 at 15:17
• What a definition, lol, +1 – Daniel Apon Jun 8 '17 at 16:14
• Even if you restrict to programs/functions computable within $\mathsf{NC}^1,$ as represented by the class of outputs of Barrington's transformation to 0/1-valued matrix branching programs (of a given program size and input size).. it's still interesting. No need to push all the way up to $\mathsf{P}$ to find a good question here. – Daniel Apon Jun 8 '17 at 18:20
• @DanielApon: What are you talking about? It seems like a legit definition to me, albeit a bit weird. Also, what do complexity classes have to do with anything here? Isn't this a question about (hyper)computation? – Andrej Bauer Jun 8 '17 at 18:49
• @DanielApon I'm fine with either direction (ideally, an answer should address both). – PyRulez Jun 8 '17 at 19:03


text:
# IO

To log something in the console, make sure to import the proper package. Then, in the main function, we can log like this:

import Effect (Effect)main = log "Hello world"

## Logging more than one thing

To run more than one thing in the main function, we need to use the do-keyword an proper indentation:

main = do  log "Hello world"  log "Hello World"

## Logging an expression

In case of a variable:

name = "John Doe"main = log (show name)

In case of a function-call:

double :: Int -> Intdouble x = x * 2main = log (show (double 2))

This will get "4" logged. Surprise! Please notice the additional braces around the function-call. Optionally, store the function call in a variable before logging.

## Concatinating stuff in the console

In this example, we have a function for doubling an integer. The second function calls the first one, but converts and returns the first ones value to a string. Plus, it concatinates it with another string:

doubleNumber :: Int -> IntdoubleNumber x = x * 2printDoubleNumber :: Int -> StringprintDoubleNumber x = "The Result: " <> (show (doubleNumber x))main = log (printDoubleNumber 2)

In the console: "The Result: 4"


text:
# CSES - Coin Combinations I

Author: Michael Cao

### Prerequisites

Main IdeaExample Code

In this problem, we are asked the number of ways to achieve some value, $x$, using $n$ coins of distinct values where the order of coins does not matter. This is known as the "Unordered Coin Change" problem, which you can read about in CPH Chapter 7 under "Counting the Number of Solutions".

# Main Idea

To solve this problem, let $\texttt{dp[w]}$ equal the number of ways to achieve the sum of values, $w$. Then, for some weight $w$, let's try to use each coin. For $\texttt{dp[w]}$, we'll transition from $\texttt{dp[w - coin[i]]}$ for all $i$, where $\texttt{coin[x]}$ defines the value of the $x$-th coin.

So, the transitions are:

$dp[w] = \sum_{i=1}^n{(dp[w - coins[i]])}$

### Warning!

Remember to take your answer mod $10^9 + 7$, as instructed in the problem statement.

## Example Code

C++

#include <bits/stdc++.h>using namespace std;using ll = long long;using vi = vector<int>;#define pb push_back#define rsz resize#define all(x) begin(x), end(x)#define sz(x) (int)(x).size()using pi = pair<int,int>;#define f first

Java

### Note

An otherwise working solution that uses dp[i] %= m; instead of if (dp[i] > M) dp[i] -= M; may time out on CSES, but would work on USACO, which gives double time for Java (see line 32 of the solution).

import java.io.*;import java.util.*;
public class CountingCoins1 {	static BufferedReader r = new BufferedReader(new InputStreamReader(System.in));	static PrintWriter pw = new PrintWriter(System.out);
public static void main(String[] args) throws IOException {		StringTokenizer st = new StringTokenizer(r.readLine());		int n = Integer.parseInt(st.nextToken());

Python

### This section is not complete.

Any help would be appreciated! Just submit a Pull Request on Github.

We don't currently have a Python solution for this problem. Please switch to another language to view the solution code.

### Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!


text:
WeBWorK Problems

by Paul Seeburger -
Number of replies: 1

Hi!

I want to know if I am using the most current method to require exact answers in WebWork problems.

I found a way to require no decimals in student answers (in order to force an exact answer like pi to be entered.

It is:

ANS(no_decimals("$c/2 *pi")); and it requires that I load: "PGasu.pl", I also kept students from entering functions in their numeric answer using: Context()->flags->set( reduceConstants=>0, # no decimals reduceConstantFunctions=>1, # combine 4+5*2? formatStudentAnswer=>'parsed', # no decimals ); My question is: Is there a "better" way to do this same thing using a MathObject checker? I saw something about NumberCheck, but no code examples that I could find on how to use it as I want to in a WebWork problem. I also found another method called: exact_no_trig It seems to do about the same thing as what I implemented above, but it still seems to not be a MathObjects checker, right? Thanks! Paul In reply to Paul Seeburger Re: Exact Answers in MathObjects cmp? by Davide Cervone - You can use  Context("Numeric"); Parser::Number::NoDecimals; ANS(Compute("$c/2 pi")->cmp);

to get the effect of your first example using MathObjects. Note that your flags do not prevent students from entering decimals or functions. They only affect how the student and correct answers are displayed.

If you want to disable functions so that students have to write 1/2 rather than sin(pi/6), then you can use

    Context()->functions->Disable('Trig');

There are other categories that can be disabled, or you can disable individual functions. See the Wiki page on Answer Checkers and the Context for details.

Davide


text:
# Getting a real number from a complex number

I'm attempting to program a formula to say how full an horizontal cylinder is with liquid. Here is the formula I am using with variables from measurements I took:

When I use Wolframalpha to solve this I end up getting a complex number, and quite frankly I'm not quite sure what to do with it(link here). I need a real number in cubic inches or gallons to obtain my end goals.

Can someone help me to understand why I a getting a complex number and how I can possibly get a real number? A different formula maybe? This website does the calculations I want, but I have no idea how it does it.

-
If you are computing $\cos^{-1} x$ and $x$ is not between $-1$ and $1$, you are going to get a complex value. The problem is that there is something wrong with your formula. –  Thomas Andrews Jul 12 '12 at 15:52
A similar problem came up in another post a day or so ago. I'd guess that W|A gave you an answer with a very small imaginary term. If that's the case, just ignore the imaginary part as an artifact of what's going on under the W|A hood, so to speak. –  Rick Decker Jul 12 '12 at 15:59
If you look at the Alpha result, the argument of $\cos^{-1}$ is $\frac{1-384\sqrt 2}3$, far outside $[-1,1]$. –  Ross Millikan Jul 12 '12 at 16:12
A good thought, Rick (and my first thought, as well). It turns out in this case that OP's formula is incorrect. –  Cameron Buie Jul 12 '12 at 16:28
@Cameron. You're right--there's a misplaced parenthesis. –  Rick Decker Jul 12 '12 at 17:10

Obviously, the volume is length times cross-sectional area, so we need only determine what that area will be.

For $h<r$ (as in the particular example), you're looking at the area of a circular sector with angle $\theta\in(0,\pi)$ such that $\cos\frac{\theta}{2}=\frac{r-h}{r}$--so given the sign, we have $$\sqrt{\frac{1+\cos\theta}{2}}=\frac{r-h}{r}$$ as the determining equation--less the area of the triangle formed by 2 radii and the chord on that circular sector. The area of the triangle will be $$\frac{1}{2}r^2\sin\theta,$$ and the area of the sector will be $$\frac{1}{2}r^2\theta,$$ so we need only determine $\theta$ and $\sin\theta$ in terms of $r$ and $h$.

$1+\cos\theta=\frac{2(r-h)^2}{r^2}$, so $\cos\theta=\frac{2r^2-4rh+2h^2}{r^2}-1=\frac{r^2-4rh+2h^2}{r^2}$, and so $$\theta=\arccos\left(\frac{r^2-4rh+2h^2}{r^2}\right).$$ Using Pythagorean identity and the fact that $\sin\theta$ is positive for $\theta\in(0,\pi)$, we find also that $\sin\theta=\sqrt{1-\cos^2\theta}$, which through simplification gives us $$\sin\theta=\frac{2\sqrt{2rh-h^2}(r-h)}{r^2}.$$

Thus, our volume will be $$\frac{1}{2}Lr^2\arccos\left(\frac{r^2-4rh+2h^2}{r^2}\right)-L\sqrt{2rh-h^2}(r-h).$$

If you want to extend your answer to the other cases, then obviously, when $r=h$, we have $\frac{1}{2}L\pi r^2$ as the volume. When $r<h\leq 2r$, we will take the whole volume of the tube and subtract a similar volume as we had in the first case, with the one exception being that we'll swap $h$ and $r$ in one term, so that the volume will be $$L\pi r^2-\frac{1}{2}Lr^2\arccos\left(\frac{r^2-4rh+2h^2}{r^2}\right)+L\sqrt{2rh-h^2}(h-r).$$

-

As commented by Thomas and Ross, the values you're putting into the inverse cosine function are not in the interval $[-1,1]$, so you're going to get complex answers out of your formula.

This is one way that I would go about deriving the corrected formula:

Consider a cylindrical water tank (tipped on its side) with length $L$, radius $r$, filled with water to a height $h$, as pictured in the link you provided.

To find the volume of the water, we will want to integrate the area of horizontal cross sections as we go along a vertical axis. For simplicity, let's set up a vertical $y$-axis with 0 located at the center of the circle at the end of the tank. Then the horizontal cross sections of the tank look like rectangles with length $L$, and a width which we can call $w$. You can (kind of) see what this looks like in this poorly drawn diagram:

Now, using the Pythagorean Theorem, we find that at a certain height $y$ we have width $w = 2\sqrt{r^2-y^2}$, and so the cross-sectional area of the tank at height $y$ is given by $A = 2L\sqrt{r^2-y^2}$. Now if we integrate this with respect to $y$ on the interval $[-r,h]$, we should get the volume up to height $h$. We get the integral $$V = \int_{-r}^h 2L\sqrt{r^2-y^2} dy .$$ We can evaluate this by using the trig substitution $y = r\sin \theta$. Making this substitution, get \begin{align*} V &= \int_{-\pi/2}^{\sin^{-1}(h/r)} 2L r\cos \theta \cdot r \cos \theta d\theta \\ &= 2L r^2 \int_{-\pi/2}^{\sin^{-1}(h/r)} \cos^2 \theta d\theta \\ &= 2L r^2 \int_{-\pi/2}^{\sin^{-1}(h/r)} \left( \frac 12 + \frac 12 \cos(2 \theta) \right) d\theta \\ &= 2L r^2 \left( \frac \theta 2 + \frac 14 \sin 2\theta \right) \bigg|_{-\pi/2}^{\sin^{-1}(h/r)} \\ &= L r^2 (\theta + \sin \theta \cos \theta ) \bigg|_{-\pi/2}^{\sin^{-1}(h/r)} \\ &= L r^2 \left( \sin^{-1} \left( \frac hr \right) + \frac \pi 2 - \frac hr \sqrt{r^2-h^2} \right) \\ &= L r^2 \sin^{-1} \left( \frac hr \right) + \frac \pi 2 L r^2 - Lrh \sqrt{r^2-h^2} . \end{align*}

-


text:
# An Optimal Fox AI Using State Machines

I’ve really enjoyed thinking about the puzzles at http://gurmeet.net/puzzles/, especially looking for ways to solve them or get hints as to how to solve them using visualization without knowing the answers. Last Time I explored puzzle 11, Treasure Island, and this time I’ll look at puzzle 5, Fox in a Hole.

## The Puzzle

Here is the wording from http://gurmeet.net/puzzles/:

Consider five holes in a line. One of them is occupied by a fox. Each night,
the fox moves to a neighboring hole, either to the left or to the right. Each
morning, you get to inspect a hole of your choice. What strategy would ensure
that the fox is eventually caught?

## The Challenge

The question I asked was, can we, without knowledge of a working strategy, create a fox that plays optimally against us so we can be sure we’ve come up with a strategy that will work? We could simulate a fox that chooses to move left or right randomly, but we would never be sure that our strategy is fool proof. Can we make sure our fox plays hard to get if we don’t even know how to catch it? Turns out we can. Try out the demo of my solution and see if you can both figure out how to catch the fox and understand why a strategy works. Implementation details are below the demo. Code is at https://gist.github.com/azundo/5941503.

### Instructions

Click on a hole to select it for inspection. You win if the fox has nowhere
left to hide. If you give up, click the button and one possible path the fox
could have taken to avoid your inspections will be shown.

## A Quantum Fox

Instead of modeling our fox as being in one concrete location, we’ll keep track of all possible holes the fox could be in at any given time without getting caught, depending on which holes we have inspected in the past. We’ll use a finite-state machine to keep track of which holes the fox could be in. If we ever get to the state where the fox couldn’t be in any holes without being caught, we know our strategy is a good one. We don’t require any knowledge of the best path for the fox to choose, or a winning strategy.

### Our State Space

Each state in our state space will consist of all of the possible holes the fox could be in at any one time. There are 5 holes and each hole has two states: it is either possible for the fox to be in that hole, or not possible. This gives us a state space of size 2^5 = 32. We could model this as a bit vector with 5 bits, but for clarity I will use a simple array. If it is possible for the fox to be in hole i, then our state array will contain i. We’ll number our holes 0, 1, 2, 3, 4.

For example, before we check any holes, our state would be [0, 1, 2, 3, 4]. The fox could be in any hole. If we check hole 2, then our state would move to [0, 1, 3, 4]. In the case where there is no possible hole for our fox to be in without catching him at some point, our state is an empty array [].

### State Transitions

The key implementation detail when using a state machine is our state transitions. How do we decide which state we move to next? In our case our next state is dependent on two things, our previous state (the set of possible holes the fox could have been in yesterday) and our selection of which hole to check.

To start let’s forget about the action of checking a hole. How can we determine what holes the fox can be in based on what holes it could have been in yesterday? If it was possible for the fox to be in hole i yesterday, then it is possible for the fox to be in any hole beside i today. If we iterate over all of the holes that the fox could have been in yesterday then we’ll get the set of holes it could be in today.

We’ll use a very simple adjacency list to make our lives easy. If we access element i of the adjacency list we will get back an array containing all of the holes next to i.

This adjacency list defines a very simple graph where each hole is a node connected by edges to each of its adjacent holes. The first and last holes only have one adjacent hole (and thus one edge) while the others have two.

Accessing element 0 of our ADJACENCY_LIST tells us which holes are next to hole 0. If we want to know the set of possible future holes, we take the set of possible past holes and add all of the adjacent holes. Simple enough.

Lastly we don’t include the hole that we chose to inspect since the fox would get caught if he ended up there. Hence, our transition function looks like this:

If we ever end up with an empty state, the fox has nowhere to go. We must have caught it at some point, no matter where it started and how it decided to move.

Every time we select a hole to inspect, we’ll update our state and push a copy of it onto an array to keep track of what states we’ve been through in the past. We’ll use that later.

### Reconstructing the Fox’s Moves

If we save each state we reach, we can reconstruct a possible path the fox could have taken to get to the current state. Let’s choose any arbitrary hole from the current state, and work backwards by looking for adjacent holes in the previous state. We are guaranteed to find a backwards path since every hole in our current state must be possible. Here is the code:

## Demo and Further Steps

Throwing this together with some d3.js drawing and we get the demo from above. The full code is in a gist at https://gist.github.com/azundo/5941503 and viewable on bl.ocks.org at http://bl.ocks.org/azundo/5941503.

You could also make solving the puzzle a bit easier if you showed all possible holes the fox could be in as you go along, instead of only showing one possible path at the end. Feel free to fork and implement this as a good exercise in d3 basics.

Now can you catch the fox?


text:
# Imitate Integrate's behavior with regard to the integrand parameter (scoping/naming)

Using Integrate, I can do any of the following:

Integrate[x^2, {x,0,2}]

Clear[f]; f[x_]:=x^2; Integrate[f[x],{x,0,2}]

Clear[f]; f=x^2; Integrate[f,{x,0,2}]

and all three return 8/3, as they should. When I asked this question, the accepted answer works, as I just discovered, in the first and second cases, but not in the third. In the third case, using HoldAll prevents the first argument from being properly evaluated. For reference, a simplified version of the solution proposed in the above referenced question, which simply returns the given function with variable name translated to an internal local, is:

Clear[i];
i[fn_, intvl_] :=
Module[{ii, externalSymbol, localVar},
externalSymbol =
ReleaseHold[Hold[intvl] /. {x_, y__} :> HoldPattern[x]];
ii = ReleaseHold[Hold[fn] /. externalSymbol :> localVar];
ii];
SetAttributes[i, HoldAll];

When invoked as above (with i in place of Integrate), the three invocations return respectively localvar$<number>^2, localvar$<number>^2, x^2.

Is it possible to define i so that its parameter interpretation behavior matches that of Integrate?

• But Integrate is not HoldAll. p.s. take a look at table implementation in this answer: mathematica.stackexchange.com/a/567/5478 – Kuba Apr 12 '18 at 12:54
• @Kuba That's pretty interesting. So I wonder why the answer to the question I linked to above gave a much more complicated solution? The point of that original question was to isolate the variable name in the parameter list from any values that it held outside of the function. (I know that that wasn't your answer.) – rogerl Apr 12 '18 at 15:55


text:
UCL Discovery

Weak lensing forecasts for dark energy, neutrinos and initial conditions

Debono, I; Rassat, A; Refregier, A; Amara, A; Kitching, TD; (2010) Weak lensing forecasts for dark energy, neutrinos and initial conditions. Monthly Notices of the Royal Astronomical Society , 404 (1) pp. 110-119. 10.1111/j.1365-2966.2010.16284.x.

Abstract

Weak gravitational lensing provides a sensitive probe of cosmology by measuring the mass distribution and the geometry of the low redshift universe. We show how an all-sky weak lensing tomographic survey can jointly constrain different sets of cosmological parameters describing dark energy, massive neutrinos (hot dark matter), and the primordial power spectrum. In order to put all sectors on an equal footing, we introduce a new parameter $\beta$, the second order running spectral index. Using the Fisher matrix formalism with and without CMB priors, we examine how the constraints vary as the parameter set is enlarged. We find that weak lensing with CMB priors provides robust constraints on dark energy parameters and can simultaneously provide strong constraints on all three sectors. We find that the dark energy sector is largely insensitive to the inclusion of the other cosmological sectors. Implications for the planning of future surveys are discussed.

Type: Article Weak lensing forecasts for dark energy, neutrinos and initial conditions An open access version is available from UCL Discovery 10.1111/j.1365-2966.2010.16284.x http://dx.doi.org/10.1111/j.1365-2966.2010.16284.x English © 2010 RAS Definitive versions of articles pre-2013 are available at http://onlinelibrary.wiley.com/journal/10.1111/(ISSN)1365-2966, now published by http://mnras.oxfordjournals.org UCLUCL > Provost and Vice Provost OfficesUCL > Provost and Vice Provost Offices > UCL BEAMSUCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Maths and Physical SciencesUCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Maths and Physical Sciences > Dept of Space and Climate Physics https://discovery.ucl.ac.uk/id/eprint/1375613


text: SammanfattningA diagram of 81 different ways (topologies) to connect two proteins. Every connection can be positive, negative or absent. Disconnected topologies are shaded gray. Author: Karthik Raman


text:
Next: Bibliography Up: Advanced Computer Algebra: From Newton Previous: Hensel Lifting

# Solving polynomial equations via Newton iteration

Let R be a commutative ring R with units. Let p R and R[y]. We are concerned with solving the equation

 (g)  =  0. (120)

The following Proposition 10 states that Relation (122) computes better and better approximations of solutions of Relation (120) that is, approximations modulo higher and higher powers of p.

Proposition 10   Let R[y], k and g, h R be such that

 (g)   0 modpk (121)

Assume that (g) is invertible modulo p and let denote by (g)-1 its inverse. Consider an element h R such that

 h   g - (g) (g)-1modp2 k (122)

Then the following assertions hold
1. (g  0 modp2 k
2. h   g modpk
3. (h) is invertible modulo p

Remark 18   Intuitively, Proposition 10 says that if g is a good approximation of a zero of then h is a better approximation, at least twice as accurate.

Remark 19   Proposition 10 leads to an algorithm provided that we can
• check whether (g) is invertible modulo p and
• compute its inverse modulo p in case.
Then for computing the inverse of (h) modulo p the idea is to apply the algorithm to itself! That is, to the particular case of

 (g)  =  1/g - f (123)

This leads to Algorithm 9. Finally recall that for a prime element p in an Euclidean domain R, the computation of (g)-1 modulo p can be done by the Extended Euclidean Algorithm.

Algorithm 9

Theorem 14   Algorithm 9 is correct.

Proof. Let gr   gr-1 - (gr-1)sr-1modp2r. Then we have

 g   gr modp (124)

In other words gr is a solution of higher precision. Then proving the theorem turns into proving the invariants for i = 0 ... r
1. gi   g0modp,
2. (gi  0 modp2i,
3. if i < r then si (gi  1 modp2i.
The case i = 0 is clear and we assume that i > 0 holds. Then by induction hypothesis p2i-1 divides
(gi-1)
si-1 - (gi-1)-1
Then p2i divides their product, that is

 (gi-1si-1   (gi-1)(gi-1)-1 modp2i. (125)

Now we calculate

 gi gi-1 - (gi-1)si-1 modp2i gi-1 - (gi-1)(gi-1)-1 modp2i
(126)

Now applying Proposition 10 with g = gi, h = gi and k = 2i-1 we obtain the first two invariants.

...

Remark 20   The general mutivariate Newton iteration works as follows. Let = (,...,) be a function in n variables y1,..., yn. From an approximation a n to a commo root of ,..., we obtain a better one a * with

 a *   =  a - J-1(a) (a) (127)

where J is the Jacobian matrix of . The Hensel lifting can be considered as a special case of Newton iteration as follows.
• Consider the coefficients of g and h in a factorization f = g h as indeterminates.
• Comparing the coefficients of 1, x, x2,... lead to a system of n equations and n unknowns whose solution leads to a factorization of f.
• The invertibility of J is equivalent to the coprimality of f and g. Indeed J is exactly the Sylvester matrix of f and g. Hence, its determinant is the resultant of f and g.

Next: Bibliography Up: Advanced Computer Algebra: From Newton Previous: Hensel Lifting
Marc Moreno Maza
2003-06-06