Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Why the root function cannot converge?

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-02-2015
04:17 PM

11-02-2015
04:17 PM

Hi, guys,

Could someone help me with the below problem? Please see the attachment's last page for further details.

Thank you very much!

Shawn

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-02-2015
04:32 PM

11-02-2015
04:32 PM

Changing the range from "0" to "1" to "0.1" to "1" seems to fix the problem.

I hope this helps.

Norm

6 REPLIES 6

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-02-2015
04:32 PM

11-02-2015
04:32 PM

Changing the range from "0" to "1" to "0.1" to "1" seems to fix the problem.

I hope this helps.

Norm

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-02-2015
05:17 PM

11-02-2015
05:17 PM

Re: Why the root function cannot converge?

Yes, that trick works.

Thank you very much!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-02-2015
06:18 PM

11-02-2015
06:18 PM

Re: Why the root function cannot converge?

I'm not sure I would label it as a "trick". I can't read your worksheet, but I suspect it's more of a valuable lesson in numerical computing. I don't know what the function u(t) is, but I suspect that if you try to evaluate du(0) you will get a divide by zero error.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-02-2015
07:31 PM

11-02-2015
07:31 PM

Re: Why the root function cannot converge?

Richard Jackson wrote:

Well, depends how you define "trick", I suppose, but the word had much the same effect on me as it seems to have done on you. You are right - a quick look at the function reveals that there is a discontinuity at t = 0, leading to a failure of du(0) to converge hence the error. The "trick", as Norman has said, is to simply shift the range into the region where the function is continuous ...

The "Real Trick" here is to plot the function over a sufficient range to show where likely problems are going to occur, evaluate the functions at "The Usual Suspects", and to make due allowances for them taking into account the limitations of the numerical tools (eg, avoid discontinuities!).

Stuart

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-02-2015
08:23 PM

11-02-2015
08:23 PM

Re: Why the root function cannot converge?

Yes, I presume the time domain as positive, therefore I missed the negative part.

Given the discontinuity, I understand why the "trick" works.

This is a good thought to check the range for the root function.

Thank you Stuart!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

11-03-2015
06:55 AM

11-03-2015
06:55 AM

Re: Why the root function cannot converge?

Shawn Fan wrote:

Yes, I presume the time domain as positive, therefore I missed the negative part.

Given the discontinuity, I understand why the "trick" works.

This is a good thought to check the range for the root function.

No problem, Shawn ... I suspect most of have scars from being bitten by this particular dog and its friends! Numeric routines are particularly prone to wagging their tails nicely most of the time, then turning round and snapping at you for some seemingly unfathomable reason. It helps to understand a little bit about solvers in general to give some clue as to why they are returning bizarre results, or failing to return results at all, for some problem where the solution is obvious even to a two-year old.

Stuart