Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16512

Re: Result to DEQ with WA versus Step-by-Step Yields

From Itai Seggev <itais@wolfram.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Result to DEQ with WA versus Step-by-Step Yields
Date 2014-02-02 04:45 +0000
Message-ID <lckihb$1h7$1@smc.vnet.net> (permalink)
References <20140201055416.D6FE16A13@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


On Sat, Feb 01, 2014 at 12:54:16AM -0500, amzoti wrote:
> When you solve this DEW using WA, you get a result.
> 
> However, when you click step-by-step, the result is different.
> 
> Is this a bug?
> 
> v'' + 10 v' + 125 v = 250 unitstep(t), v(0) = 0, v'(0) = 25

Yes and no, but I think mostly no in this case. 

The initial answer given by W|A is computed algorithmically, for example by
DSolve.  In contrast, the step-by-step answer is computed in manner which
attempts to simulate how a person might do it.  There's no guarantee that these
will be produce identical forms for the answer.  If they forms are different
but the answers agreen, then that's certainly not a bug.

Now, let's compare the two answers (v is the step-by-step answer, w the
algorithmic answer):

In[29]:= FullSimplify[w[t]-v[t]]
Out[29]= \[Piecewise]	-2+(2 Cos[10 t]+Sin[10 t])/E^(5 t)	t<0
	 		0	     	       			True

So they are the same for t>=0, but not for negative times.  Now, looking at the
step-by-step solution, it uses the Laplace transform method--a very reasonable
choice, because the discontinuity in the forcing function limits the number of
methods which will work.  (Of methods typically covered in an introductory
course, this is probably the only one which will work).  However, a Laplace
transform is only defined for t>=0.  Which likely means that both answers are
right for t>=0, but that only w is correct for negative t.  Indeed, if put the
v back into the original equation we find:

In[39]:= (v^\[Prime]\[Prime])[t] + 10 Derivative[1][v][t] + 
   125 v[t] == 250 UnitStep[t] // Simplify

Out[39]= t >= 0

So v only obeys the ODE for t>=0.  On the other hand, when is w plugged into
the DE you see: 

In[40]:= (w^\[Prime]\[Prime])[t] + 10 Derivative[1][w][t] + 
   125 w[t] == 250 UnitStep[t] // Simplify

Out[40]= Indeterminate == 0 || t != 0

The Indeterminate == 0 comes from the fact that Mathematica can't compute the
second derivative at t == 0 as w only has 1 continuous derivative.  (Indeed,
since the forcing function is discontinuous you're not actually guaranteed
unique solutions, but this is the sort of system which typically does have
them.)  But for all other times, w is the correct solution to the ODE.

So the discrepency comes from choice of method in step-by-step, except under
the circumstances I think it's an entirely reasonable choice.  If you disagree,
you can certainly provide feedback (the plus sign in the bottom right corner of
the == output), which will be forwarded to the relevant developers.

--
Itai Seggev
Mathematica Algorithms R&D
217-398-0700 

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar


Thread

Re: Result to DEQ with WA versus Step-by-Step Yields Itai Seggev <itais@wolfram.com> - 2014-02-02 04:45 +0000

csiph-web