0
$\begingroup$

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[0] + t^2*h[2] + t^3*h[3] + t^4*h[4] + t^5*h[5] + O[t]^6;

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

aa[t_] = t^2 * a[2] + t^3*a[3] + t^4* a[4] + t^5*a[5] + t^6*a[6] + 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[2], a[3], h[3], m[3], .... However, I get divid[0]' , divid[0], denom[0], denom[0]''...

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.

$\endgroup$
1
$\begingroup$

It works for me by using the function definitions below:

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

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

aa[t_] := 
  t^2*a[2] + t^3*a[3] + t^4*a[4] + t^5*a[5] + t^6*a[6] + 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[8]:= first[t]
Out[8]= (h[0]+m[0]-b m[0])^2/(4 Sqrt[k] a[2]^(3/2) t^3)-(3 (a[3] (h[0]+m[0]-b m[0])^2))/(8 (Sqrt[k] a[2]^(5/2)) t^2)+((((15 a[3]^2)/(8 a[2]^2)-(3 a[4])/(2 a[2])) (h[0]+(1-b) m[0])^2)/(4 Sqrt[k] a[2]^(3/2))+((h[0]+(1-b) m[0]) (h[2]+(1-b) m[2]))/(2 Sqrt[k] a[2]^(3/2)))/t+O[t]^0

The renaming is for avoiding infinit recursions.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.