cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

4-Participant

## How to remove the straight line coming in x-axis at the point -0.3

Dear all,

I want to remove the straight line coming in the x-axis at the point -0.3

in my attached plot.

Please go through the attached plot.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
21-Topaz II
(To:vveeran)

Hi vetri veeran,

are you Looking for something like this?

Regards

FM

19 REPLIES 19
21-Topaz II
(To:vveeran)

Hi vetri veeran,

are you Looking for something like this?

Regards

FM

4-Participant
(To:-MFra-)

Yes, That is what I need.

What is the reason for the straight line at that point ?

Could you please tell me ?

21-Topaz II
(To:vveeran)

The function in that range, jumps from minus infinity to plus infinity. These jumps occur, in the case of rational functions, in correspondence of the poles of the function. This is what happens to your function. We should analytically determine the values of x that make the function infinite. In other words a method could be this: what are the value of x  which make the first derivative of f(x) equal to π / 2.

4-Participant
(To:-MFra-)

Dear FM,

Could you please tell me in detail from the above program, how to determine for which

value of x, the function becomes infinite which will be very much helpful to me ?

Because, in mathcad, for x ranging from -3 to 3, if I enter f(x), it just shows an error as "divide by zero" it is difficult to find

for which values of x, the function becomes infinite ?

24-Ruby V
(To:vveeran)

> Because, in mathcad, for x ranging from -3 to 3, if I enter f(x), it just shows an error as "divide by zero" it is difficult to find for which values of x, the function becomes infinite ?

What do YOU think happens here, if x equals zero?

Check:

Solving for the other denominator gives you the position of the vertical asymptote, the pole:

The exact value is

4-Participant
(To:Werner_E)

Dear @W.E,

Thank you very much.

24-Ruby V
(To:vveeran)

I had not saved the file to keep it.

Do you experience any difficulties in typing in the two or three expressions?

4-Participant
(To:Werner_E)

Dear @W.E,

I can't type fnew(x) = NaN on error f(x).

Also, when I type 1+beta.G(x).Vm^2 solve,x -->

I am getting error as bad solve variable.

Thats why could you please attach the code.

Thanks.

24-Ruby V
(To:vveeran)

> I can't type fnew(x) = NaN on error f(x).

You can't simply type this, you have to use the symbolic palette to insert the "on error" statement

> Also, when I type 1+beta.G(x).Vm^2 solve,x -->

>I am getting error as bad solve variable.

Probably because you have already assigned x a value or range.

type x:=x before the symbolic solve - this clears the variable (but only for symbolic operations).

BTW - what do you see as my name when you are logged in? You should see WE when you are mot logged in, but after you logged in you should see my full name. Do you see it?

4-Participant
(To:Werner_E)

Dear Wener Exinger,

I can see you name Werner Exinger after I logged in.

Since, F.M used your name in the previous comment as W.E so I followed that.

24-Ruby V
(To:vveeran)

> Since, F.M used your name in the previous comment as W.E so I followed that.

No problem. He seems to like initials as he is using intials as his "real" name, too.

I just wondered if anything with the settings was broken but am glad to hear that all works as it should.

21-Topaz II
(To:vveeran)

Hi vetri veeran,

it follows my reworking, also thanks to the instructions of W. E .:

4-Participant
(To:-MFra-)

Dear @F.M,

Thank you so much.

21-Topaz II
(To:vveeran)

HI vetri veeran

I'm sorry, I would have to attach it first.

Greetings

F.M.

24-Ruby V
(To:vveeran)

BTW, here is another way to avoid the vertical line without having to split the plot in two plots (which in my opinion is something undesirable):

4-Participant
(To:Werner_E)

Hello,

I tried to use your method in my Mathcad 15 for vertical asymptotes but unfortunatelly, it does not work (file attached)

Could you help me ?

Thank you.

Richard

24-Ruby V
(To:ptc-4127093)

You have basically 2 errors:

1) The definition of h.plot is wrong in the first line. The wrong version cannot be distinguished from the correct one with the naked eye. In the left placeholder of the "on error" statement there is only "NaN". Then the whole "on error" statement must be assigned to F. You made the assigment "F <- NaN" in the left placehoder of the "on error" statement.

I tried to make it more clear by highlighting it in yellow and setting parenthesis in the picture below

2) The second problem is the range variable used for plotting. You defined a range from -3 to 2 with a step width of 1. Thats far to coarse. My stepwidth 0.001 may be a bit too fine and you may try -3,-2.99 .. 2.

BTW, you don't have to use a range variable for plotting at all. Delete the definition of x.plot and see how mathcad choses its own range for plotting. This feature is called "quick plot". Most the time it works fine but I nevertheless often find it better to use a range as it gives me the control over start and stop value and stepwidth.

I try to avoid to name that variable which is just used for plotting "x" as I usually want x to be a "free" variable without any value. Thats the reason for naming it "x.plot". Often I name it just "x." because when the focus is outside of the plot this variable looks like "x".

BTW, your function h(x) plot quite fine without any vertical artefact if you use a simple quickplot. No need for any tricks 😉

4-Participant
(To:Werner_E)

Thank you very much for your help.

I wish you a Happy New Year from Belgium.

Richard

24-Ruby V
(To:ptc-4127093)

@ptc-4127093 wrote:

Thank you very much for your help.

I wish you a Happy New Year from Belgium.

Richard

You are welcome!

Happy New Year to you, too, from Austria!

Werner

Announcements
Top Tags