4.10

<< Graphics`ImplicitPlot`

ImplicitPlot[(Sqrt[Abs])[x] + (Sqrt[Abs])[y] == 1, {x, -1, 
        1}, {y, -1, 1}]

s1 = (∫_0^1)(y /. 
              y ->  (1 - (Sqrt[x]))^2) \[DifferentialD]x

s = 4*s1

4.11

f[x_] := (x^3) + a (x^2) + b x + c

ans = 
      Solve[{f[1] == 0, f[2] == 9, 
          D[f[x], x] == 4 /. x -> 1}, {a, b, c}]

fx = f[x] /. ans

Plot[fx, {x, -2, 2}]

kyoku = Solve[D[fx, x] == 0, x]

fx /. kyoku[[1]]
fx /. kyoku[[2]]

4.12

f1[x_] := (x^2) + 1
f2[x_] := (a x + b)/(x + 1)

eq = {f1[1] == f2[1], D[f1[x], x] == D[f2[x], x]} /. 
        x -> 1
ans = Solve[eq, {a, b}][[1]]

Plot[{f1[x], f2[x] /. ans}, {x, 0, 5}, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}]

4.13

para = {p ->  {x, y}, a -> {3, 1}, b ->  {5, 5}}

ans = 
      Solve[(p - a) . (p - a) == (p - b) . (p - b) /. 
          para, y]

fig1 = 
      Plot[y /. ans, {x, -1, 7}, 
        PlotStyle ->  Hue[0.9]]
fig2 = 
      ListPlot[{a, b} /. para, PlotJoined -> True, 
        PlotStyle ->  Hue[0.7]]
Show[fig1, fig2, AspectRatio -> Automatic, 
      GridLines -> Automatic]

4.14

fx = x^2 (x - 1)^2

Plot[fx, {x, -1, 2}]

(∫_0^1) fx \[DifferentialD]x

4.15

fx = -x^4 + 3
eq = 4 x + y == k

zu1 = Plot[fx, {x, -4, 4}, PlotStyle ->  Hue[0.9]]

zu2 = 
      ImplicitPlot[eq /. k ->  6, {x, -4, 4}, {y, -4, 4}, 
        PlotStyle ->  Hue[0.7]]

Show[zu1, zu2]

ans = 
      Solve[{D[fx, x] == -4, k - 4 x == fx}, {x, 
          k}]

Plot[{fx, -4 x + k /. ans[[1, 1]]}, {x, -4, 4}]

4.16

fx = Abs[x + 1] + Abs[x]

Plot[fx, {x, -3, 3}, GridLines ->  Automatic]

4.17

para = {b -> {2, 0}, c -> {x, y}}

ans = 
      Solve[{c . c == (1 + (Sqrt[3]))^2, (b - c) . (b - c) == 6} /. 
          para, {x, y}]

N[ans]

2 y/2 /. ans[[2]] 
FullSimplify[%]

4.18

fx = x^3 + 9

sx = 
      m (x + 2)  + 1 /. 
        m ->  (D[fx, x] /. x -> -2)

Solve[fx == sx, x]

Plot[{fx, sx}, {x, -6, 5}, PlotRange -> {-50, 100}, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}]

4.19

fx = x^3 + x^2 - x + c

cx = 
      fx /. x -> Cos[θ] + I Sin[θ]

im2 = ComplexExpand[cx - Conjugate[cx]]/I

Plot[im2 /. θ ->  Pi n, {n, 0,  2}]

ans1 = Solve[im2 == 0, θ]

re2 = ComplexExpand[cx + Conjugate[cx]]

ans2 = Solve[re2 == 0 /. ans1[[4]], c]

ans3 = Solve[(fx /. ans2) == 0, x]

ComplexExpand[Exp[I Pi/3]]

ComplexExpand[-Exp[I 2 Pi/3]]

4.20

fx = x^4 - 4  x^3 + 2  x^2 + 4  x - 1

gx = fx /. x ->  x + 1 // Simplify

Plot[{fx, gx}, {x, -3, 4}, AspectRatio ->  0.3, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}]

Solve[fx == 0, x]

4.21

fx = x^2
gx = -(x - 6)^2

sf = 
      m (x - p) + p^2 /. 
        m -> (D[fx, x] /. x -> p)

sg = 
      m (x - q) - (q - 6)^2 /. 
        m -> (D[gx, x] /. x -> q)

ans = Solve[Coefficient[sf, x] == Coefficient[sg, x], 
          q][[1]]

pten = {p, fx /. x -> p}
qten = Simplify[{q, gx /. x -> q} /. ans]

L2 = (pten - qten) . (pten - qten)

kyoku = Solve[D[L2, p] == 0, p]

q /. ans /. kyoku[[1]]

L = Sqrt[L2] /. kyoku[[1]]

zu1 = 
      Plot[{fx, gx, 
          sf /. kyoku[[1]], sg /. ans /. kyoku[[1]]}, {x, -6, 
          10}, PlotStyle -> {Hue[0.9], Hue[0.7]}]

zu2 = 
      ListPlot[{pten, qten} /. ans /. kyoku[[1]], 
        PlotStyle ->  PointSize[0.03]]

Show[zu1, zu2]