How do you choose basis functions in finite element analysis? I'm having some trouble understanding the underlying mathematics in finite elements. I know it's widely used to solve PDEs especially in structural applications. From what I understand you discretize a PDE into smaller basis functions and solve each one and sum them up to find an approximate solution. Generally a basis function is chosen based on the geometry(from what I understand). So if you're solving for the deflection along a rod, you would split it into elements, and each element is a function you choose based on the behavior of the deflection you assume to get(correct me if I'm wrong).
But how do you get basis functions for a PDE in which you don't have a physical interpretation of? Like what if someone gave you a PDE and told you to solve it using finite elements how would you go about this? If I'm thinking about it wrong please correct me (I'm new to this).
 A: 
From what I understand you discretize a PDE into smaller basis
  functions and solve each one and sum them up to find an approximate
  solution.

Space is partitioned into smaller volumes, the finite elements.
The base functions $\Psi^{(e)}_i$ are used to approximately represent the solution $f$ over the finite element $e$. 
$$
\left. f(x) \right\vert_e \approx \sum_i c_i^{(e)} \Psi_i^{(e)}(x)
$$
E.g. a rod would be modeled as a collection of tetraeders, boxes, prisms, etc, this collection is called a mesh. 
The choice of base functions for the particular elements depend on what accurracy is desired, and probably factors like numerical stability, numerical effort. Also properties of the expected solution might be considered.
Many elements with low order base functions might achieve the same accuracy like fewer elements with high order base functions.
This usually leads to a large linear system in the coefficients $c_i^{(e)}$,
which is solved by exact or approximative methods.
The method how to formulate the linear system of coefficients for the elements depends on the type of PDE, and conditions like continuity of the solution and boundary conditions on the elements.

Like what if someone gave you a PDE and told you to solve it using
  finite elements how would you go about this?

I would pick up one of the many books on FEM and have a look if the PDE is already solved. The big ones (heat / diffusion fields, stress tensor, wave equations) have been treated along with how to handle certain boundary conditions. 
Otherwise one needs to learn the method. Mathematically this touches calculus of variations, functional analysis and numerical analysis. 
The engineers have derivations which root more in their methods on how to solve physical problems.
