If both functions are univariate, you can define the difference between the two as the objective function and use uniroot() to find the intersection (where the difference is 0). If the functions are multivariate, you can use optim() to minimize the squared or absolute difference between the two functions, instead of uniroot().
HTH, Andy > From: Rajarshi Guha > > Hi, > I have two functions (which are basically fouriers series) > and I would > like to find the points of intersection (in general there will be more > than one). Is there any function in R which would allow me to > solve the > equations? Or should I be looking at packages like octave/mathematica? > > Thanks, > > ------------------------------------------------------------------- > Rajarshi Guha <[EMAIL PROTECTED]> <http://jijo.cjb.net> > GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE > ------------------------------------------------------------------- > A bug in the code is worth two in the documentation. > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}} ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
