Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: capacitor equation solution not working
Replies: 7   Last Post: Jun 22, 2011 6:33 AM

 Messages: [ Previous | Next ]
 michael partensky Posts: 48 Registered: 11/22/09
Re: capacitor equation solution not working
Posted: Jun 17, 2011 5:06 AM

Sorry, my last comment is irrelevant for your setting where the current is a
given function (which is unusual but formally valid).
Best
MP

On Thu, Jun 16, 2011 at 11:49 PM, michael partensky <partensky@gmail.com>wrote:

>
>> On Fri, Jun 17, 2011 at 12:09 AM, J and B <noslowski@comcast.net> wrote:
>>

>>> I am trying to solve a very simple circuit, one that has only a capacitor
>>> in
>>> it. What am I doing wrong? The final graph should show that the
>>> capacitor
>>> has discharged, but its staying constant. I have current starting at
>>> t=10
>>> and ending at t=60.
>>> I hope I have used the correct way to put in my code, I am using a new
>>> computer and I having trouble with my email program. Any advice would be
>>> appreciated.
>>>
>>> Thanks
>>>
>>> I did not check the rest , but fixing two formatting errors can

>> >
>> > My code.
>> > I[t_]:= If[t<10||t>60,0,1]
>> > Plot[i[t],{t,0,100}] (* you use different letters for the current, iand

>> I; btw, I is reserved for the imaginary unit *)
>>
>> *Eq*=v'[t]==i[t]/c
>> c=1;

>> >
>> > c=1;
>> > Soleq==v[t]/.NDSolve[{*eq*,v[0]==0},v[t],{t,0,100}],[[1]]
>> > Plot[soleq,{t,0,100}]

>> ( **Eq* and *eq* are also different *)
>
> Btw, your circuit without a resistor is "short": the capacitor will
> discharge instantly.
> Be also aware that the derivative of a step function is expressed though
> the so called delta-function which must be handled with extreme care.
>
> Best
> MP
>
>

Date Subject Author
6/17/11 michael partensky
6/17/11 michael partensky
6/17/11 DrMajorBob
6/18/11 noslowski
6/22/11 Dana DeLouis
6/18/11 DrMajorBob