1
$\begingroup$

I am a beginner in Mathematica. I'm wondering if Mathematica could do the integration of a complex function and plot the values in a 3D graph. Here is the code.

p = 1; μ = 0.2; ν = 0.1;(*we can change these values of course*)
Φ[z_] := p/3 (z/Sqrt[z^2 + 1] + 1/2);
Φp[z_] := D[Φ[z], z];
ϕ[z] = Integrate[Φ[z], z] // FullSimplify
Ω[z_] := p/3 (z/Sqrt[z^2 + 1] - 1/2);
Ψ[z_] := 1/z^2 Φ[z] - 1/z^2 Conjugate[Ω[1/z]] - 1/z Φp[z]
ψ[z] := Integrate[Ψ[z], z] // FullSimplify

And the function I want to plot is like this, z here is a complex variable

displacement[z_] = 1/(2 μ) ((3 - 4 ν) ϕ[z] - z Conjugate[Φ[z]] - Conjugate[ψ[z]])

Till here, there are no error messages. But when I replace z with x + y I, here comes the invalid integration variable or limit error message

disu[x_, y_] := Re[displacement[x + y I]] // FullSimplify 
disv[x_, y_] := Im[displacement[x + y I]] // FullSimplify

And of course when I plot them, I get nothing

Plot3D[disu[x, y], {x, -2, 2}, {y, -2, 2}]
Plot3D[disv[x, y], {x, -2, 2}, {y, -2, 2}]

Anyone knows a solution? Thanks in advance!

$\endgroup$
  • $\begingroup$ The definition of displacement needs a := $\endgroup$ – Mauricio Fernández Nov 11 '16 at 11:34
  • $\begingroup$ @Mauricio Lobos: This does not help. $\endgroup$ – user64494 Nov 11 '16 at 16:03
  • $\begingroup$ Your integral in the assignment to ψ[z] is undefined. Try running Integrate[\[CapitalPsi][z], z] and you'll see what I mean. $\endgroup$ – Josh Bishop Nov 15 '16 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.