How to handle age and timepoint variables in a mixed-model for longitudinal data? I have a longitudinal dataset: 
DV: Task performance on three within-subject conditions at each time point
IVs 


*

*Timepoint (variable interval, up to three occasions, missing data at random)

*Age at each time-point (variable initial age, variable interval between time-points)

*Task categorical variable.


I would like to test for differences between the trajectories of within-person change in each of the three three within-subject task conditions while also accounting for the age differences.


*

*What variables should be fixed and random effects (task, age, timepoint)?

*How do I code timepoint since the intervals are variable?

*Should I center age by the youngest age in the sample?

*How do timepoint and age work together?

 A: Age is a time-varying-covariate.  They can be tricky.  In this case, you wouldn't include both current age and time, because they would be collinear.  Instead, you can have age at baseline as a (static) covariate, and also include timepoint.  


*

*My guess is that you would have fixed effects for age at baseline, timepoint, and task.  You would probably have a random intercept and a (possibly covarying) random slope on timepoint for each subject.  

*You could code the timepoints as time from when each subject began the study.  That is timepoint $= 0$ for each subject at the point you first interact with them (either applying some intervention or taking your first measurement).  For every additional measurement, timepoint would be the elapsed time since the beginning of their involvement with the study.  

*You needn't necessarily center age.  However, the intercept in your model / output will refer to the fitted mean response value when a subject is born, which may not be a meaningful value for you.  If you center age, the intercept will refer to the mean response value when a subject's age at baseline is equal to the mean age at baseline of your sample.  

*(See the comment at the beginning.)  



Edit: (maybe now I understand what you're doing a little more clearly) 
You need to also add an interaction between task and timepoint as a fixed effect, and add (possibly covarying) random effects for task and the task X timepoint interaction.  That way, each subject will be able to have their own slope over time for each task.  The model will fit the population mean trajectory for each task over time.  
