== Exercise Sheet 1 - Basics

=== Exercise 1 @Exercise[1, 1]

#block(
  fill: luma(230),
  inset: 8pt,
  radius: 4pt,
[
  Determine whether the following sequences converge. Calculate the limit in case of convergence.

  #set enum(numbering: "(a)")
  + $ a_n = (2024 (1+n+n^2))/(n(n+2023)) $
  + $ a_n = sqrt(n^2+n dot b_1+b_2)-n; quad b_1,b_2 in RR $
  + $ a_n = (n^4-2)/(n^2+4) + (n^3(3-n^2))/(n^3+1) $
])

#set enum(numbering: "(a)")
+ $
  a_n &= (2024 (1+n+n^2))/(n(n+2023)) \
  &= ((2024 (1+n+n^2))/n^2)/(1+2023/n) \
  &= (2024 (1/n^2+1/n+1/))/(1+2023/n) \
  &= (2024/n^2+2024/n+2024)/(1+2023/n) \

  => lim_(n -> infinity) a_n &= lim_(n -> infinity) (2024/n^2+2024/n+2024)/(1+2023/n) \
  &= lim_(n -> infinity) 2024/1 = 2024 checkmark \
$

+ $
  a_n &= sqrt(n^2+n dot b_1+b_2)-n; quad b_1,b_2 in RR \
  &= ((sqrt(n^2+n dot b_1+b_2)-n) (sqrt(n^2+n dot b_1+b_2)+n))/(sqrt(n^2+n dot b_1+b_2)+n) \
  &= (n^2+n dot b_1+b_2 - n^2)/(sqrt(n^2+n dot b_1+b_2)+n) \
  &= (n dot b_1+b_2)/(sqrt(n^2+n dot b_1+b_2)+n) \
  &= (b_1+b_2/n)/((sqrt(n^2+n dot b_1+b_2)+n)/n) \
  &= (b_1+b_2/n)/((sqrt(n^2+n dot b_1+b_2))/n+1) \
  &= (b_1+b_2/n)/((sqrt(n^2+n dot b_1+b_2))/sqrt(n^2)+1) \
  &= (b_1+b_2/n)/(sqrt(1+b_1/n+b_2/(n^2))+1) \

  => lim_(n -> infinity) a_n &= lim_(n -> infinity) (b_1+b_2/n)/sqrt(1+b_1/n+b_2/(n^2))+1 \
  &= b_1/(sqrt(1) + 1) = b_1/2 checkmark
$

+ $
  a_n &= (n^4-2)/(n^2+4) + (n^3(3-n^2)) / (n^3+1) \
  &= ((n^4-2)(n^3+1) + (n^3(3-n^2))(n^2+4)) / ((n^2+4)(n^3+1)) \
  &= (n^7+n^4-2n^3-2 + 3n^5+12n^3-n^7-4n^5) / ((n^2+4)(n^3+1)) \
  &= (-n^5+n^4+10n^3-2) / (n^5+n^2+4n^3+4) \
  &= (-1+1/n+10/(n^2)-2/(n^5)) / (1+1/(n^3)+4/(n^2)+4/(n^5)) \

  => lim_(n -> infinity) a_n
  &= lim_(n -> infinity) (-1+1/n+10/(n^2)-2/(n^5)) / (1+1/(n^3)+4/(n^2)+4/(n^5)) \
  &= lim_(n -> infinity) -1/1 = 1 checkmark
$

#pagebreak()

=== Exercise 2 @Exercise[1, 2]

#block(
  fill: luma(230),
  inset: 8pt,
  radius: 4pt,
[
  Examine whether the following series converge or diverge.

  #set enum(numbering: "(a)")
  + $ A = sum_(n=1)^infinity (2^n n!)/(n^n) $
  + $ A = sum_(n=1)^infinity 1/(n^n) $
])

#set enum(numbering: "(a)")
+ $
  A &= sum_(n=1)^infinity (2^n n!)/(n^n) \
  a_n &= (2^n n!)/(n^n) #text("Ratio Test") \
  => lim_(n -> infinity) a_n
  &= lim_(n -> infinity) abs((a_(n+1))/(a_n)) \
  &= lim_(n -> infinity) abs( ( (2^(n+1) (n+1)!)/((n+1)^(n+1)) )/( (2^n n!)/(n^n) )) \
  &= lim_(n -> infinity) abs( ( 2^(n+1) dot (n+1)! dot n^n )/( 2^n dot n! dot (n+1)^(n+1) )) \
  &= lim_(n -> infinity) abs( ( 2 dot (n+1)! dot n^n )/( n! dot (n+1)^(n+1) )) \
  &= lim_(n -> infinity) abs( ( 2 dot (n+1) dot n^n )/( (n+1)^(n+1) )) \
  &= lim_(n -> infinity) abs( ( 2 dot n^n )/( (n+1)^n )) \
  &= lim_(n -> infinity) abs( 2 dot ( n^n )/( (n+1)^n )) \
  // &= lim_(n -> infinity) abs( 2 dot (n/(n+1))^n ) \
  // &= lim_(n -> infinity) 2 dot (n/(n+1))^n \
  &= lim_(n -> infinity) 2 dot (1/(1+1/n))^n \
  &= 2 dot e > 1 => a_n thin #text("diverges") checkmark
$

+ $
  a_n &= 1/(n^n) #text("Root Test") \
  root(n, abs(1/(n^n))) &= 1/n -> 0 < 1 \
  &=> a_n #text(" diverges") checkmark
$

#pagebreak()
=== Exercise 3 @Exercise[1, 3]
#block(
  fill: luma(230),
  inset: 8pt,
  radius: 4pt,
[
  Determine the maximal domain of the following functions as a subset of $RR$
  and calculate their derivatives.

  #set enum(numbering: "(a)")
  + $ f(x) = ln((e^x) / (1+e^x)) $
  + $ f(x) = ((x+1)/(x-1))^2 $
])

#set enum(numbering: "(a)")
+ $
  f(x) &= ln((e^x) / (1+e^x)) \
  e(x) = e^x wide a(x) &= (e^x)/(1+e^x) wide b(x) = 1+e^x \

  ln: RR^+ |-> RR wide e&: RR |-> RR^+ wide => f: RR |-> RR <=> DD_f = RR \

  e'(x) = e(x) wide ln'(x) &= 1/x wide b'(x) = e^x \
  a'(x) &= (b dot e' - b' dot e)/(b^2) space #text("Quotientenregel") \
  a'(x) &= ([1+e^x] dot e^x - e^x dot e^x)/([1+e^x]^2) \
  a'(x) &= (e^x + e^(2x) - e^(2x))/(1+2e^x+e^(2x)) = (e^x)/([1+e^x]^2) \

  f'(x) &= ln'(a(x)) dot a'(x) \
  &= 1/((e^x)/(1+e^x)) dot (e^x)/([1+e^x]^2) \
  &= (1+e^x)/(e^x) dot (e^x)/([1+e^x]^2) \
  &= (1+e^x)/([1+e^x]^2) \
  &= 1/(1+e^x) checkmark
$
+ $
  D_f &= RR \\ {x = 1}\
  f(x) &= ((x+1)/(x-1))^2 \
  a(x) = x+1 wide b(x) = x-1 quad&quad c(x) = a(x)/b(x) wide d(x) = x^2 \
  a'(x) = 1 wide b'(x) &= 1 wide d'(x) = 2x \
  c'(x) &= (b' dot a - b dot a')/(a^2) \
  &= (x-1 - (x+1))/((x-1)^2) \
  &= (-2)/((x-1)^2) \
  f'(x) &= d'(c(x)) dot c'(x) \
  &= 2 dot (x+1)/(x-1) dot (-2)/((x-1)^2) \
  &= -4 dot (x+1)/((x-1)^3) checkmark
$

#pagebreak()
=== Exercise 4 @Exercise[1, 4]
#block(
  fill: luma(230),
  inset: 8pt,
  radius: 4pt,
[
  Calculate the following integrals using substitution:

  #set enum(numbering: "(a)")
  + $ integral (2x+7)/(x^2+7x+3) thin d x $
  + $ integral (cos(ln(x)))/(x) thin d x $
])

#set enum(numbering: "(a)")
+ $
  A &= integral (2x+7)/(x^2+7x+3) thin d x \
  &= integral (a'(x))/(a(x)) thin d x \
  &= integral (a'(x))/(a(x)) thin d x \
  &= integral 1/(a(x)) dot a'(x) thin d x; wide d u = a'(x) thin d x \
  &= integral 1/u d u \
  &= ln(u) = ln(x^2+7x+3) checkmark
$
+ $
  A &= integral (cos(ln(x)))/(x) thin d x \
  &= integral cos(ln(x)) dot 1/x thin d x \
  &= integral cos(u) dot u' thin d x \
  &= integral cos(u) dot d u \
  &= sin(u) \
  &= sin(ln(x)) \
$

#pagebreak()
=== Exercise 5 @Exercise[1, 5]
#block(
  fill: luma(230),
  inset: 8pt,
  radius: 4pt,
[
  Calculate the following integrals using partial integration:

  #set enum(numbering: "(a)")
  + $ integral (x+2) dot e^(2x) thin d x $
  + $ integral x^2 dot ln(x) thin d x $
])

#set enum(numbering: "(a)")
+ $
  u(x) &= x => u'(x) = 1; space v(x) = e^(2x) dot 1/2 x => v'(x) = e^(2x) \
  A &= integral (x+2) dot e^(2x) thin d x \
  &= integral x dot e^(2x) thin d x + integral 2 dot e^(2x) thin d x wide \
  &= integral x dot e^(2x) thin d x + 2 dot integral e^(2x) thin d x \
  &= integral x dot e^(2x) thin d x + 2 dot 1/2  e^(2x) \
  &= integral x dot e^(2x) thin d x + e^(2x) \
  &= integral u(x) dot v'(x) thin d x + e^(2x) \
  &= [u(x) dot v(x)] - integral u'(x) dot v(x) thin d x + e^(2x) \
  &= x dot e^(2x) dot 1/2 - integral 1 dot e^(2x) dot 1/2 thin d x + e^(2x) \
  &= 1/2 x dot e^(2x) - e^(2x) 1/4 + e^(2x) \
  &= e^(2x) dot (1/2 x - 1/4 + 1) \
  &= 1/2 e^(2x) dot (x - 1/2 + 2) \
  &= 1/2 e^(2x) dot (x + 3/2) checkmark
$
+ $
  u(x) &= x^2 => u'(x) = 2x; space 
  v(x) = ln(x) dot x - x #footnote([für Hochleitung $ln(x)$ siehe @ln-hochleitung]) 
  => v'(x) = ln(x) \
  A &= integral x^2 dot ln(x) thin d x \
  &= integral u(x) dot v'(x) thin d x \
  &= [u(x) dot v(x)] - integral u'(x) dot v(x) thin d x \
  &= [x^2 dot (ln(x) dot x - x)] - integral 2x dot (ln(x) dot x - x) thin d x \
  &= [x^2 dot (ln(x) dot x - x)] - 2 dot integral x^2 dot (ln(x) - 1) thin d x \
  &=> ??? \ \


  u'(x) &= x^2 => u(x) = 3x^3 dot 1/3; space v(x) = ln(x) => v'(x) = 1/x \
  A &= integral x^2 dot ln(x) thin d x \
  &= integral u'(x) dot v(x) thin d x \
  &= u(x) dot v(x) - integral u(x) dot v'(x) thin d x \
  &= 1/3 x^3 dot ln(x) - integral 1/3 x^3 dot 1/x thin d x \
  &= 1/3 x^3 dot ln(x) - integral 1/3 x^2  thin d x \
  &= 1/3 x^3 dot ln(x) - 1/9 x^3 \
  &= 1/3 x^3 (ln(x) - 1/9) checkmark
$ 
