# Why Series calculating the derivatives of user-defined function instead of terms of that function

I defined below functions which are power series of t.

I need to have the solution of first[t_] as power series of t.

I know it is because of the Taylor expansion. But I need the answer in terms of terms of my function , not derivatives !

h[t_] = h + t^2*h + t^3*h + t^4*h + t^5*h + O[t]^6;

m[t_] = m + t^2 *m + t^3 *m + t^4 *m + t^5 *m + O[t]^6;

aa[t_] = t^2 * a + t^3*a + t^4* a + t^5*a + t^6*a + O[t]^7 ;

cc[t_] = 1/2*(1 - 1/k*(m[t]));

divid[t_] = Series[(h[t] + (1 - b)*m[t])^2, {t, 0, 4}]

denomi[t_] = 4*Sqrt[k] *Series[(aa[t])^(3/2), {t, 0, 5}]

first[t_] = Series[(divid[t]/denomi[t]), {t, 0, 1}]


The answer of first[t_] should be in terms of say a, a, h, m, .... However, I get divid' , divid, denom, denom''...

Also, I do not think that it is because of the division of two functions, sometime I get the same baheviour when I run divid or denomi.. Any help will be appreciated. Thanks.

It works for me by using the function definitions below:

hh[t_] := h + t^2*h + t^3*h + t^4*h + t^5*h + O[t]^6;

mm[t_] := m + t^2*m + t^3*m + t^4*m + t^5*m + O[t]^6;

aa[t_] :=
t^2*a + t^3*a + t^4*a + t^5*a + t^6*a + O[t]^7;

cc[t_] := 1/2*(1 - 1/k*(mm[t]));

divid[t_] := Series[(hh[t] + (1 - b)*mm[t])^2, {t, 0, 4}]

denomi[t_] := 4*Sqrt[k]*Series[(aa[t])^(3/2), {t, 0, 5}]

first[t_] := Series[(divid[t]/denomi[t]), {t, 0, 1}]


Example:

In:= first[t]
Out= (h+m-b m)^2/(4 Sqrt[k] a^(3/2) t^3)-(3 (a (h+m-b m)^2))/(8 (Sqrt[k] a^(5/2)) t^2)+((((15 a^2)/(8 a^2)-(3 a)/(2 a)) (h+(1-b) m)^2)/(4 Sqrt[k] a^(3/2))+((h+(1-b) m) (h+(1-b) m))/(2 Sqrt[k] a^(3/2)))/t+O[t]^0


The renaming is for avoiding infinit recursions.

• @Meva, Armin used := where you have = in your definitions. – N.J.Evans Oct 10 '16 at 13:09
• Thanks @ N.J.Evans , however, I still get derivatives. Nothing has changed. – Meva Oct 10 '16 at 13:13
• Also, I am not sure I understand why the function needs to have delayed definition . – Meva Oct 10 '16 at 13:23
• Guys, thank you both. My code works now. @Armin , you have changed the function definitions and it worked! – Meva Oct 10 '16 at 14:13