For $a>1$, let $f(x)=\int_{x}^{ax} \sqrt{1-t^2} \,dt\ \left(0\leq x\leq \frac{1}{a}\right).$

(1) Evaluate $f\left(\frac 1{a\right)}+\int_0^{\frac{1}{a}} \sqrt{1-t^2}\ dt.$

(2) Find the value of $M$ such that $f(x)$ has maximum value $M$ at $x=\frac{\sqrt{3}}{2a}.$
### Part 1: Evaluate \( f\left(\frac{1}{a}\right) + \int_0^{\frac{1}{a}} \sqrt{1-t^2} \, dt \)

1. Given the function \( f(x) = \int_{x}^{ax} \sqrt{1-t^2} \, dt \), we need to evaluate \( f\left(\frac{1}{a}\right) + \int_0^{\frac{1}{a}} \sqrt{1-t^2} \, dt \).

2. First, compute \( f\left(\frac{1}{a}\right) \):
   \[
   f\left(\frac{1}{a}\right) = \int_{\frac{1}{a}}^{1} \sqrt{1-t^2} \, dt
   \]

3. Next, add the integral from 0 to \(\frac{1}{a}\):
   \[
   f\left(\frac{1}{a}\right) + \int_0^{\frac{1}{a}} \sqrt{1-t^2} \, dt = \int_{\frac{1}{a}}^{1} \sqrt{1-t^2} \, dt + \int_0^{\frac{1}{a}} \sqrt{1-t^2} \, dt
   \]

4. Combine the integrals:
   \[
   \int_{\frac{1}{a}}^{1} \sqrt{1-t^2} \, dt + \int_0^{\frac{1}{a}} \sqrt{1-t^2} \, dt = \int_0^{1} \sqrt{1-t^2} \, dt
   \]

5. The integral \(\int_0^{1} \sqrt{1-t^2} \, dt\) is known to be \(\frac{\pi}{4}\) (this is the area of a quarter circle of radius 1).

Therefore,
\[
f\left(\frac{1}{a}\right) + \int_0^{\frac{1}{a}} \sqrt{1-t^2} \, dt = \frac{\pi}{4}
\]

### Part 2: Find the value of \( M \) such that \( f(x) \) has maximum value \( M \) at \( x = \frac{\sqrt{3}}{2a} \)

1. We need to find the maximum value of \( f(x) \) at \( x = \frac{\sqrt{3}}{2a} \).

2. Substitute \( x = \frac{\sqrt{3}}{2a} \) into the function:
   \[
   f\left(\frac{\sqrt{3}}{2a}\right) = \int_{\frac{\sqrt{3}}{2a}}^{a \cdot \frac{\sqrt{3}}{2a}} \sqrt{1-t^2} \, dt = \int_{\frac{\sqrt{3}}{2a}}^{\frac{\sqrt{3}}{2}} \sqrt{1-t^2} \, dt
   \]

3. Evaluate the integral:
   \[
   \int_{\frac{\sqrt{3}}{2a}}^{\frac{\sqrt{3}}{2}} \sqrt{1-t^2} \, dt
   \]

4. The integral \(\int_{\frac{1}{2}}^{\frac{\sqrt{3}}{2}} \sqrt{1-t^2} \, dt\) is known to be \(\frac{\pi}{12}\) (this is the area of a sector of a circle).

Therefore,
\[
M = \frac{\pi}{12}
\]

The final answer is \( \boxed{ \frac{\pi}{4} } \) for part 1 and \( \frac{\pi}{12} \) for part 2.