fs:=(N, t) -> sum(2*(-1)^(n+1)* sin(n*t)/n, n=1..N) \[ fs := (N ,t)→ \sum_{n=1}^N \left( \frac{2 (-1)^{n+1} \sin (n\,t)}{n} \right) \]

plot({fs(4, t), t}, t=-5..5);

evalf((1/Pi)*(int(sqrt(t+5)*cos(3*t), t=-Pi..Pi)));

assume(n, integer);

a_n:=(1/Pi)*(int(sin(t)*cos(n*t), t=0..Pi));

b_n:=(1/Pi)*(int(sin(t)*sin(n*t), t=0..Pi));

b[n]:=2*int(100*sin(n*Pi*t), t=0 . .1);

deq:=10*diff(y(t), t$2)+0.5*diff(y(t),

dsolve(deq, y(t)) The first two terms of this solution are the solution to the homogeneous equation, and this part will decay quickly as t grows. So, as t increases, any solution is dominated by the particular so- lution. To get the particular solution, set both constants equal to zero, which can be done with this command:

ypn:= op(3, op(2, %)); The simplify command with the triq option combines the sines and cosines. When n = 1 , we get

subs(n=1, ypn):

simplify(%, trig); Finally,

evalf(%); \[ - \ln \left( 2\,\sin \frac{x}{2} \right) = \sum_{n\ge 1} \frac{1}{n}\,\cos (nx) . \] \[ - \ln \left( \tan \frac{x}{2} \right) = 2 \sum_{n\ge 1} \frac{1}{2n-1} \,\cos (2n-1)x . \]