MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Some problems with DSolve and NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19786] Re: [mg19745] Some problems with DSolve and NDSolve
  • From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
  • Date: Fri, 17 Sep 1999 01:36:42 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

The problem is that your system is actually overdetermined.

First of all treat i1[t],i2[t],i1'[t],i2'[t] as independent variables. You
can then express i1[t] in terms of i2[t]:

In[1]:=
Solve[{2 i1[t] + 2 (i1'[t] - i2'[t]) == 80 t E^(-2t), 4 i2[t] + 2 (i2'[t]
- i1'[t]) == 0}, {i1[t], i1'[t], i2[t]}, {i2'[t]}]

Out[1]=
           40 t
{{i1[t] -> ---- - 2 i2[t]}}
            2 t
           E

In[2]:=
i1[t_] := Evaluate[i1[t] /. %[[1]]]

In[3]:=
i1[t]
Out[3]=
40 t
---- - 2 i2[t]
 2 t
E

Now the two differential  equations turn into the same one:
In[5]:=
2 i1[t] + 2 (i1'[t] - i2'[t]) == 80 t E^(-2t) // Simplify
Out[5]=
     -80    160 t
0 == ---- + ----- + 4 i2[t] + 6 i2'[t]
      2 t    2 t
     E      E

In[6]:=
 4 i2[t] + 2 (i2'[t]
- i1'[t]) == 0 // Simplify
Out[6]=
-80    160 t
---- + ----- + 4 i2[t] + 6 i2'[t] == 0
 2 t    2 t
E      E

So we really need to solve just one of them:

In[7]:=
           80     160 t
DSolve[{-(----) + ----- + 4 i2[t] + 6 i2'[t] == 0, i2[0] == 0}, i2[t], t]
           2 t     2 t
          E       E
Out[7]=
                  (4 t)/3
           5 - 5 E        + 20 t
{{i2[t] -> ---------------------}}
                    2 t
                   E

In[8]:=
i2[t_] := Evaluate[i2[t] /. %[[1]]]

Hence the solution is:

In[11]:=
{i1[t], i2[t]}
Out[11]=
                  (4 t)/3                 (4 t)/3
 40 t   2 (5 - 5 E        + 20 t)  5 - 5 E        + 20 t
{---- - -------------------------, ---------------------}
  2 t              2 t                      2 t
 E                E                        E

One can easily verify that it is correct.
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp


----------
>From: "Chee Lim Cheung" <cheelc at mbox2.singnet.com.sg>
To: mathgroup at smc.vnet.net
>To: mathgroup at smc.vnet.net
>Subject: [mg19786] [mg19745] Some problems with DSolve and NDSolve
>Date: Wed, Sep 15, 1999, 4:53 PM
>

> Hi MathGroupers,
>
> I was somewhat surprised that DSolve is unable to solve the following
> relatively innocuous system of 1st-order ODEs:
>
> DSolve[{2 i1[t] + 2 (i1'[t] - i2'[t]) == 80 t E^(-2t), 4 i2[t] + 2 (i2'[t]
> - i1'[t]) == 0, i1[0] == 0, i2[0] == 0}, {i1[t],i2[t]}, t]
>
> The normally reliable NDSolve also falls down on the following:
>
> NDSolve[{2 i1[t] + 2(i1'[t] - i2'[t]) == 80 t E^(-2t), 4 i2[t] + 2(i2'[t] -
> i1'[t]) == 0, i1[0] == 0, i2[0] == 0}, {i1[t], i2[t]}, {t, 0, 1}]
>
> What is wrong?
>
> Thanks
> Chee
> 


  • Prev by Date: Re: Special 3D Plots
  • Next by Date: Re: Mathematica always writes some functions with their names
  • Previous by thread: Some problems with DSolve and NDSolve
  • Next by thread: Re: Some problems with DSolve and NDSolve