Message Boards Message Boards

GROUPS:

Plotting functions that have constants and variables

Posted 5 months ago
756 Views
|
1 Reply
|
1 Total Likes
|

The function I have to plot is (I wrote beta as k, check the image attached)

*dy/dz = -kb/Pi * cot(Piy/b)tan(kz)**

So first I set the y[z] as y[t] for ease, but actually I have to use constants b & k.

DSolve[{y'[t] == (-1/Pi)*Cot[Pi*y[t]]*Tan[1/(2*t)]}, y[t], t]

Then I set the plot as,

Plot[y[t], {y,0,1}, {t,0,2*Pi}]

But seems that it doesn't work.

Below picture is the graph I have to plot. There are boundaries.

This is what my professor asked me to plot. <strong>See the axis.

Could I get any advice to make a plot for kz, y/b?

Thanks!

Your equation seems to be very - let's say - sensitive due to 1 / t and the poles of Tan and Cot. Furthermore on my system DSolve doesn't give an answer. So I tried it numerically:

yF = y /. 
  NDSolve[{y'[t] == (-1/Pi)*Cot[Pi*y[t]]*Tan[1/(2*t)], y[.2] == .01}, 
    y, {t, .2, .3}][[1, 1]]
Plot[yF[t], {t, .2, .6}]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract