Turn on suggestions

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

Showing results for

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

Showing results for

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

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

Sep 06, 2015
05:35 PM

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

Sep 06, 2015
05:35 PM

Odesolve Question

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.

ACCEPTED SOLUTION

Accepted Solutions

Sep 07, 2015
02:40 PM

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

Sep 07, 2015
02:40 PM

I think you need to do it as in the attached (note, I've redone your first solve block in such a way as to help with the second one).

Alan

8 REPLIES 8

Sep 06, 2015
06:21 PM

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

Sep 06, 2015
06:21 PM

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

Sep 06, 2015
10:15 PM

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

Sep 06, 2015
10:15 PM

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.

Sep 07, 2015
12:30 PM

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

Sep 07, 2015
12:30 PM

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.

Sep 07, 2015
01:10 PM

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

Sep 07, 2015
01:10 PM

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

Sep 07, 2015
02:40 PM

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

Sep 07, 2015
02:40 PM

I think you need to do it as in the attached (note, I've redone your first solve block in such a way as to help with the second one).

Alan

Sep 07, 2015
08:18 PM

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

Sep 07, 2015
08:18 PM

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.

Sep 08, 2015
03:15 AM

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

Sep 08, 2015
03:15 AM

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

Sep 08, 2015
09:51 AM

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

Sep 08, 2015
09:51 AM

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).