2
$\begingroup$

I have the following code that I run:

In[1]:=Clear["Global`*"];
Ia = LaplaceTransform[((78)/(10^5))*Sin[2*Pi*5*t], t, s];
Ib = LaplaceTransform[((78)/(10^5))*Sin[2*Pi*5*t], t, s];
Ic = LaplaceTransform[((78)/(10^5))*Sin[2*Pi*5*t], t, s];
R1 = 1/(s*C1);
R2 = 1/(s*C2);
R3 = 1/(s*C3);
R4 = 1;
C1 = ((1124)/10^3)*10^(-9);
C2 = ((1124)/10^3)*10^(-9);
C3 = ((1124)/10^3)*10^(-9);
FullSimplify[
 InverseLaplaceTransform[
  I4 /. FullSimplify[
     Solve[{Ia == I1 + I4, I2 == I1 + I5, I3 == I2 + I6, 
       Ic == I3 + I4, Ic == Ib + I6, Ib == Ia + I5, 
       I1 == (V1 - V2)/R1, I2 == (V2 - V3)/R2, I3 == V3/R3, 
       I4 == V1/R4}, {I1, I2, I3, I4, I5, I6, V1, V2, V3}]][[1]], s, 
  t]]

Out[1]=(58500000 (281 E^(-750000000000 t/281) \[Pi] - 
   281 \[Pi] Cos[10 \[Pi] t] + 
   75000000000 Sin[10 \[Pi] t]))/(5625000000000000000000 + 
 78961 \[Pi]^2)

I want to do two things to the output of this code:

  1. I want to remove the transient part of the equation. So I can do that by using Expand[] and after that looking for each individual term that gives $\displaystyle\lim_{t\to\infty}y_n(t)=0$. But is there a way to let Mathematica do that?
  2. After the transient part is removed, I want to find $I_4(t)$ in the standard form: $$I_4(t)=a\sin(\omega t+\varphi)\tag1$$ Where $a$, $\omega$ and $\varphi$ needs to be found using Mathematica.

Can someone help me with how I can do this in Mathematica? Thank you so much.

$\endgroup$
2
$\begingroup$

May be

Clear["Global`*"]
expr = (58500000 (281 E^(-750000000000 t/281) π - 281 π Cos[10 π t] 
      + 75000000000 Sin[10 π t]))/(5625000000000000000000 + 78961 π^2);

expr  = Expand[expr];
expr2 = Simplify[If[MatchQ[#,_.*Exp[__*t]],Limit[#,t->Infinity],#]&/@expr];

(Expand@Numerator[expr2]/.a_.*Cos[w_ t]+b_.*Sin[w_ t]
           :>Sqrt[a^2+b^2]*Sin[w*t+ArcTan[b/a]])/Denominator[expr2]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you very much. $\endgroup$
    – Jan
    Jul 4 at 11:04
0
$\begingroup$

Try this:

expr = (58500000 (281 E^(-750000000000 t/281) \[Pi] - 
      281 \[Pi] Cos[10 \[Pi] t] + 
      75000000000 Sin[10 \[Pi] t]))/(5625000000000000000000 + 
    78961 \[Pi]^2);

Then

expr1 = expr /. Exp[Rational[a_, b_]*t] -> 0 /. 
  a_*Cos[10 \[Pi] t] + b_*Sin[10*\[Pi]*t] -> 
   Sqrt[a^2 + b^2] Sin[10*\[Pi]*t + ArcTan[a, b]]

(*  -((58500000 Sin[10 \[Pi] t - ArcTan[75000000000/(281 \[Pi])]])/Sqrt[
 5625000000000000000000 + 78961 \[Pi]^2])  *)

To see it better below I show the result as an image:

enter image description here

Have fun!

$\endgroup$
2
  • 1
    $\begingroup$ The problem with Exp[Rational[a_, b_]*t] -> 0 is that it also makes Exp[3/2*t] goes to zero. Which is not correct, as this term does not go to zero in the limit $\endgroup$
    – Nasser
    Jul 4 at 11:34
  • $\begingroup$ @Nasser You are right, but OP only asked about the expression containing a single specific exponential function. In such cases, for the sake of being fast in calculations, I always prefer to make a specific replacement, rather than a general one. In general case, of course you are right, and one easily corrects this as follows: Exp[Rational[a_, b_]*t] /; a < 0 && b > 0 -> 0 or likewise. $\endgroup$ Jul 4 at 11:46

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.