I define my own function like that:
DelayL1t[(q_: 1) a_[t_]] := q Apply[a, {t - L1[t]/c}]
DelayL2t[(q_: 1) a_[t_]] := q Apply[a, {t - L2[t]/c}]
if I just do :
DelayL1t[p2[t]]
I get
p2[t - L1[t]/c]
that is correct, but if I do:
DelayL2t[DelayL1t[p2[t]]]
I get
p2[t - L1[t]/c - L2[t - L1[t]/c]/c]
while I was expecting to obtain:
p2[t - L1[t - L2[t]/c]/c - L2[t]/c]
Does anyone know what I am doing wrong? p2[t - L2[t - L2p[t]/c]/c - L2p[t]/c -L3[t - L2[t - L2p[t]/c]/c - L2p[t]/c]/c]
I would like to do a series expansion around L_[i,k]/c or L_[i,k]*L[k,i]/c^2 in order to get rid off all the terms where an arm depends on another arms..I was able to do that manually [ I attached my code] does anyone know how to built a function that does it ? It would be nice to have a sort of operator which does series expansion around certain terms! thanks in advance!
so once I got the correct time delayed :
p2[t - L2[t - L2p[t]/c]/c - L2p[t]/c -
L3[t - L2[t - L2p[t]/c]/c - L2p[t]/c]/c]
I did the expansion around L2p[t]/c:
ExpandAll[p2[t - (Normal[Series[L2[t - L2p[t]/c] /.L2p[t]/c ->
λL2p[t]/c, {λ, 0,1}]] /. λ -> 1)/c
- L2p[t]/c - L3[t - (Normal[Series[L2[t - L2p[t]/c] /.L2p[t]/c ->
λ L2p[t]/c, {λ, 0, 1}]] /. λ -> 1)/c - L2p[t]/c]/c]]
and I got:
p2[t - L2[t]/c - L2p[t]/c -L3[t - L2[t]/c - L2p[t]/c
+ (L2p[t] Derivative[1][L2][t])/c^2]/c +
(L2p[t] Derivative[1][L2][t])/c^2]
then I did the expansion around
{L2[t]/c -> λ L2[t]/c,
L2p[t]/c -> λ L2p[t]/c, (L2p[t] Derivative[1][L2][t])/
c^2 -> λ (L2p[t] Derivative[1][L2][t])/c^2}
that is:
ExpandAll[p2[t - L2[t]/c - L2p[t]/c -
1/c(Normal[Series[L3[t - L2[t]/c - L2p[t]/c
+ (L2p[t] Derivative[1][L2][t])/c^2]/.{L2[t]/c -> λ L2[t]/c, L2p[t]/c ->
λ L2p[t]/c, (L2p[t] Derivative[1][L2][t])/c^2 ->
λ(L2p[t] Derivative[1][L2][t])/c^2}, {λ, 0, 1}]]
/.λ -> 1 ) +(L2p[t] Derivative[1][L2][t])/c^2]] /. 1/c^3 -> 0
and I get:
p2[t - L2[t]/c - L2p[t]/c - L3[t]/c
+ (L2p[t] Derivative[1][L2][t])/c^2
+ (L2[t] Derivative[1][L3][t])/c^2 +
(L2p[t] Derivative[1][L3][t])/c^2]
I did the final expansion around
{(L2p[t] Derivative[1][L2][t])/
c^2 -> λ (L2p[t] Derivative[1][L2][t])/c^2, (
L2[t] Derivative[1][L3][t])/
c^2 -> λ (L2[t] Derivative[1][L3][t])/c^2, (
L2p[t] Derivative[1][L3][t])/
c^2 -> λ (L2p[t] Derivative[1][L3][t])/c^2}:
ExpandAll[
Normal[Series[
p2[t - L2[t]/c - L2p[t]/c - L3[t]/c + (
L2p[t] Derivative[1][L2][t])/c^2 + (
L2[t] Derivative[1][L3][t])/c^2 + (
L2p[t] Derivative[1][L3][t])/c^2] /. {(
L2p[t] Derivative[1][L2][t])/
c^2 -> λ (L2p[t] Derivative[1][L2][t])/c^2, (
L2[t] Derivative[1][L3][t])/
c^2 -> λ (L2[t] Derivative[1][L3][t])/c^2, (
L2p[t] Derivative[1][L3][t])/
c^2 -> λ (L2p[t] Derivative[1][L3][t])/
c^2}, {λ, 0, 1}]] /. λ -> 1 /. 1/c^3 -> 0]
and finally I got an expression where all the arm-length terms (L2[t],L3[t] and L2p[t]) do not depends anymore on other arms:
p2[t - L2[t]/c - L2p[t]/c - L3[t]/c] + (
L2p[t] Derivative[1][L2][t] Derivative[1][p2][
t - L2[t]/c - L2p[t]/c - L3[t]/c])/c^2 + (
L2[t] Derivative[1][L3][t] Derivative[1][p2][
t - L2[t]/c - L2p[t]/c - L3[t]/c])/c^2 + (
L2p[t] Derivative[1][L3][t] Derivative[1][p2][
t - L2[t]/c - L2p[t]/c - L3[t]/c])/c^2
Hey you are right! since it is difficult to explain my intention I upload an immages that show what i need to do! as you can see you where able to help me with the time delay..i was wondering if you are able to do a function that does the series expansion how it is shown.
thank you very much for your kindness
DelayL1t[DelayL2t[p2[t]]]
. Why do you expect this in your case? As far as I can tell, everything works as expected. $\endgroup$\[Lambda]L2p[t]/c
which I assume should be\[Lambda] L2p[t]/c
but I don't know for sure or whatL_[i,k]*L[k,i]
is supposed to stand for; also in you original code there was noL3
term; I included such a term in my answer to show that it could be extended to such uses if needed; please provide a clear instance of your problem as contained as possible eg if theL3
term is superfluous don't use it $\endgroup$delayBy
does not work like that; additionally, in order to get the first approximation described in the excerpt you amended your question with, you should usedelaybyApprox
notdelayBy
); please don't use screen-shots unless absolutely necessary; please identify which function-with what input-did not produce the desired output and what that desired output was, in the first place. $\endgroup$