Tuesday, September 28, 2004

i deserve a toast for this one

dubin's 105A homework is a fucking piece of shit. sorry for the language, but a homework on the second day of school that took SEVEN HOURS to do ONE problem is just NOT cool.

section 9.11.2

Find numerical values for all complex solutions to the equation E^(-3z) = (z + 2) in the range -4 < x < 4, -4 < y < 4, where z = x+ I y. (Hint: Use contour plots to plot the real and imaginary parts of the equation vs. y and x to find approximate locations of roots.)

z := x + I y

eq = E^(-3z) - (z + 2)

RealEq = Re[eq];
ImagEq = Im[eq];

CPreal = ContourPlot[RealEq, {x, -4, 4}, {y, -4, 4}, Contours -> {0}, PlotPoints -> 400, ContourShading -> False];

CPimag = ContourPlot[ImagEq, {x, -4, 4}, {y, -4, 4}, Contours -> {0}, PlotPoints -> 400, ContourShading -> False, ContourStyle -> {RGBColor[1, 0, 0]}];

Show[CPreal, CPimag];

n = {-4, -2, 0, 2, 4};

FindRoot[E^(-3z) - (z + 2), {z, 0 + n I}]

damn this stupid shit took SEVEN HOURS.

No comments:

Post a Comment

Leave a comment: