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
- :
- Odesolve Question

Options

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

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

Showing results for

Highlighted

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

09-06-2015
05:35 PM

09-06-2015
05:35 PM

I have been using Odesolve successfully for a system of equations. But when I make (to me a seemingly innocuous) change, adding a term (that is zero in this case), I get the error "This value must be a function but has the form: any1". What I am doing wrong?

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

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

09-07-2015
02:40 PM

8 REPLIES 8

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

09-06-2015
06:21 PM

09-06-2015
06:21 PM

Re: Odesolve Question

John Rudnicki wrote:

I have been using Odesolve successfully for a system of equations. But when I make (to me a seemingly innocuous) change, adding a term (that is zero in this case), I get the error "This value must be a function but has the form: any1". What I am doing wrong?

You've added another derivative (dv(t)/dt) without a relational / initialization equation, hence you've got more derivatives to solve for than you've got equations; the fact you've multiplied it by zero doesn't make any difference ... It Knows!

Stuart

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

09-06-2015
10:15 PM

09-06-2015
10:15 PM

Re: Odesolve Question

Sorry if I am being dense, but dont I still have four equations for v, tau, phi and theta, with four initial conditions? If I differentiated the 4th equation, for tau, (I was trying to avoid this), dv(t)/dt would enter that way even without the adding it in the first equation.

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

09-07-2015
12:30 PM

09-07-2015
12:30 PM

Re: Odesolve Question

JohnRudnicki wrote:

Attached is an example of what I meant by the second sentence. To me it seems the two systems are mathematically the same. If so, I do not understand why MC interprets them differently.

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

09-07-2015
01:10 PM

09-07-2015
01:10 PM

Re: Odesolve Question

John Rudnicki wrote:

JohnRudnicki wrote:

Attached is an example of what I meant by the second sentence. To me it seems the two systems are mathematically the same. If so, I do not understand why MC interprets them differently.

I'm not sure, because I rarely deal with algebraic constraints, but I think that in your original equation you effectively had v(t) as an algebraic constraint, hence why you had to include it in ODESolve's output. When you introduced the derivative, you still didn't have an explicit statement giving dv(t)/dt as a function of the other variables (not including their derivatives), hence Mathcad squawking about undefined variables (insufficient equations in Prime). By solving for dv(t)/dt, you've reduced the problem to an ordinary system of DEs, which ODESolve can handle.

Stuart

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

09-07-2015
02:40 PM

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

09-07-2015
08:18 PM

09-07-2015
08:18 PM

Re: Odesolve Question

Thanks. So basically, I needed to turn the constraint tau = ... into an ode for v(t). This is what I did in the 2nd worksheet I posted but I like yours better.

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

09-08-2015
03:15 AM

09-08-2015
03:15 AM

Re: Odesolve Question

Sorry, I should have looked at your second worksheet first, but didn't! In fact you have expressed the equations more succinctly than I did. However, for some reason, in your second sheet, in the equation for dphi/dt you replaced the v(t)/vratio of your first sheet with ln(v(t)/vratio). This might have led to a mix-up that explains why your two approaches in the second worksheet don't result in graphs that lie on top of each other.

Alan

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

09-08-2015
09:51 AM

09-08-2015
09:51 AM

Re: Odesolve Question

Thanks. It should be ln ((v(t)/v0). I corrected it in one place but not the other. But the difference in the two graphs is due to the term in eta. With eta = 0 they do coincide (at least on the graph). Eta should damp the system in a case where tau becomes unbounded, which it should for certain combinations of a, b, and khat (but I havent tried this yet).

Top Tags