${y}^{\u2034}(t)+sin(t){y}^{\u2033}(t)-g(t){y}^{\prime}(t)+g(t)y(t)=f(t)$

Write the following third order differential equation as an equivalent system of first order ordinary differential equations and write it in the form

$\frac{dz}{dt}=f(t,z)$

Here is what I have so far:

${x}_{1}(t)=y(t)$

${x}_{2}(t)={y}^{\prime}(t)$

${x}_{3}(t)={y}^{\u2033}(t)$

so I can then do,

${x}_{1}^{\prime}(t)={y}^{\prime}(t)$

${x}_{2}^{\prime}(t)={y}^{\u2033}(t)$

${x}_{3}^{\prime}(t)={y}^{\u2034}(t)=f(t)-sin(t){y}^{\u2033}(t)+g(t){y}^{\prime}(t)-g(t)y(t)$

${x}_{3}^{\prime}(t)=f(t)-sin(t){x}_{3}(t)+g(t){x}_{2}(t)-g(t){x}_{1}(t)$

and I think the dynamics function is:

$f(t,z)=[{x}_{1}^{\prime}(t),{x}_{2}^{\u2033}(t),{x}_{3}^{\u2034}(t)]$

$f(t,z)=[{x}_{2}(t),{x}_{3}(t),f(t)-sin(t){x}_{3}(t)+g(t){x}_{2}(t)-g(t){x}_{1}(t)]$

I'm not sure if I'm doing this correctly. What does difference does the f(t) and g(t) make in this case? what is z exactly?

Write the following third order differential equation as an equivalent system of first order ordinary differential equations and write it in the form

$\frac{dz}{dt}=f(t,z)$

Here is what I have so far:

${x}_{1}(t)=y(t)$

${x}_{2}(t)={y}^{\prime}(t)$

${x}_{3}(t)={y}^{\u2033}(t)$

so I can then do,

${x}_{1}^{\prime}(t)={y}^{\prime}(t)$

${x}_{2}^{\prime}(t)={y}^{\u2033}(t)$

${x}_{3}^{\prime}(t)={y}^{\u2034}(t)=f(t)-sin(t){y}^{\u2033}(t)+g(t){y}^{\prime}(t)-g(t)y(t)$

${x}_{3}^{\prime}(t)=f(t)-sin(t){x}_{3}(t)+g(t){x}_{2}(t)-g(t){x}_{1}(t)$

and I think the dynamics function is:

$f(t,z)=[{x}_{1}^{\prime}(t),{x}_{2}^{\u2033}(t),{x}_{3}^{\u2034}(t)]$

$f(t,z)=[{x}_{2}(t),{x}_{3}(t),f(t)-sin(t){x}_{3}(t)+g(t){x}_{2}(t)-g(t){x}_{1}(t)]$

I'm not sure if I'm doing this correctly. What does difference does the f(t) and g(t) make in this case? what is z exactly?