The function
AnI[n_]:=(-((2 n ((R1/R2)^((2 \[Pi])/\[Beta]) - (R2/R1)^(( 2 \[Pi])/\[Beta])) \[Beta] Aki[ 2] (Sin[n theta1] - Sin[n (theta1 + \[Beta])]))/( R2 ((R1/R2)^((2 \[Pi])/\[Beta]) + (R2/R1)^(( 2 \[Pi])/\[Beta])) (4 \[Pi]^2 - n^2 \[Beta]^2))) - ( n ((R1/R2)^(\[Pi]/\[Beta]) - (R2/R1)^(\[Pi]/\[Beta])) \[Beta] Aki[ 1] (Sin[n theta1] + Sin[n (theta1 + \[Beta])]))/( R2 ((R1/R2)^(\[Pi]/\[Beta]) + (R2/R1)^(\[Pi]/\[Beta])) (\[Pi] - n \[Beta]) (\[Pi] + n \[Beta]))); This expression contains Aki[n], for example Aki[1], Aki[2]...
Another function is
Aki[k_]:=(\[Beta] ((2 R2 (R2/R3 + R3/R2) CnI[1])/((R2/R3 - R3/R2) \[Beta]) + ( 4 R3 DnI[1])/((-(R2/R3) + R3/R2) \[Beta])) (-\[Beta] Cos[ theta1] + \[Beta] Cos[k \[Pi]] Cos[theta1 + \[Beta]] + k \[Pi] Sin[k \[Pi]] Sin[ theta1 + \[Beta]]))/((k \[Pi] - \[Beta]) (k \[Pi] + \[Beta])) + \ (\[Beta] ((2 R2 (R2/R3 + R3/R2) AnI[1])/((R2/R3 - R3/R2) \[Beta]) + ( 4 R3 BnI[1])/((-(R2/R3) + R3/R2) \[Beta])) (k \[Pi] Cos[ theta1 + \[Beta]] Sin[ k \[Pi]] + \[Beta] (Sin[theta1] - Cos[k \[Pi]] Sin[ theta1 + \[Beta]])))/((k \[Pi] - \[Beta]) (k \[Pi] + \ \[Beta])) + (\[Beta] (( R2 (R2^2/R3^2 + R3^2/R2^2) CnI[ 2])/((R2^2/R3^2 - R3^2/R2^2) \[Beta]) + ( 2 R3 DnI[ 2])/((-(R2^2/R3^2) + R3^2/R2^2) \[Beta])) (-2 \[Beta] Cos[ 2 theta1] + 2 \[Beta] Cos[k \[Pi]] Cos[2 (theta1 + \[Beta])] + k \[Pi] Sin[k \[Pi]] Sin[2 (theta1 + \[Beta])]))/( k^2 \[Pi]^2 - 4 \[Beta]^2) + (\[Beta] (( R2 (R2^2/R3^2 + R3^2/R2^2) AnI[ 2])/((R2^2/R3^2 - R3^2/R2^2) \[Beta]) + ( 2 R3 BnI[2])/((-(R2^2/R3^2) + R3^2/R2^2) \[Beta])) (k \[Pi] Cos[ 2 (theta1 + \[Beta])] Sin[k \[Pi]] + 2 \[Beta] (Sin[2 theta1] - Cos[k \[Pi]] Sin[2 (theta1 + \[Beta])])))/( k^2 \[Pi]^2 - 4 \[Beta]^2); This expression contains AnI[n], for example AnI[1], AnI[2]...
So if you want to get the equation of AnI[n] and Aki[k] in the same notebook, you have to remove the definition, otherwise it will fall into the endless loop, so how to remove the definition of AnI[n] and Aki[k] after I get their expression?
For example, you can get the expression of AnI[2],but I want to remove the definition of AnI[2] and AnI[n] after I get the expression, but it seems that Remove[AnI[2]] and Remove[AnI[n]] and Remove[AnI[*]] are all useless. So how to solve this?
And if there is some good idea to solve with this situation, fox example I have to get the expression of AnI[1] and AnI[2]... in the first notebook and get the expression of Aki[1] and Aki[2]... in the second notebook and solve the equations with AnI[1] and AnI[2]... and Aki[1] and Aki[2]... in the third notebook. So is there any way to define and solve all in one notebook?
Thank you very much!
ClearAll(ClearAll[AnI]) to remove all the definitions of a symbol likeAnI[1], AnI[2], ...orUnsetfor a single case like:Unset[AnI[1]]. $\endgroup$ClearAll[AnI[n], AnI[2]]can not work, and the hint isClearAll::ssym: AnI[n] is not a symbol or a string.andClearAll::ssym: AnI[2] is not a symbol or a string.$\endgroup$Unsetcan not work as well, the hint isUnset::norep: Assignment on AnI for AnI[n] not found.$\endgroup$ClearAllshould be called with only the symbol name and it will clear all the existing definitions for that symbol likeClearAll[AnI]. On theUnsetmessage, if you don't set any value and want to unset it, it'll raise a message as you've seen. You can suppress that withQuiet. $\endgroup$