- #1

Robben

- 166

- 2

## Homework Statement

Assume that the potential is symmetric with respect to zero and the system has amplitude ##a## suppose that ##V(x)=x^4## and the mass of the particle is ##m=1##. Write a java function that calculates the period of the oscillator for given amplitude ##a## using Gaussian quadrature with ##N=20## points.

## Homework Equations

##E = \frac12 m(\frac{dx}{dt})^2+V(x)##

##T=\sqrt{8m}\int^a_0\frac{dx}{\sqrt{V(a)-V(x)}}.##

## The Attempt at a Solution

I don't have much experience with numerical methods so I am having difficulty understanding the question and how to proceed.

Is the question asking instead of using ##T##, i.e the period given by : ##T=\sqrt{8m}\int^a_0\frac{dx}{\sqrt{V(a)-V(x)}}##, we instead must use the Gaussian quadrature of ##T##? Also, will ##T=\sqrt{8m}\int^a_0\frac{dx}{\sqrt{V(a)-V(x)}}## work for a nonquadratic function ##V(x)##?