Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13734 > unrolled thread
| Started by | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| First post | 2013-03-06 10:54 +0000 |
| Last post | 2013-04-10 04:49 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
meaningful solution to the differential eqn Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2013-03-06 10:54 +0000
Re: meaningful solution to the differential eqn debguy <johnandsara2@cox.net> - 2013-04-10 04:49 +0000
| From | Alexei Boulbitch <Alexei.Boulbitch@iee.lu> |
|---|---|
| Date | 2013-03-06 10:54 +0000 |
| Subject | meaningful solution to the differential eqn |
| Message-ID | <kh77a1$q07$1@smc.vnet.net> |
I have been trying to get a meaningful solution to the differential eqn. for the voltage and current in an inductor:
V[t] == -L i'[t]. For smooth voltage waveforms, the current function is well-behaved and a reasonable solution. But when V[t] is a piecewise function, either my own, or one of the built-in ones, such as SquareWave, the solutions obtained are unreasonable. They may satisfy the differential equation, but they increase in magnitude without limit. I tried integrating the SquareWave[t] Mathematica function, and I could see why DSolve was probably having a problem. The square wave has values +1 or -1 on each half-cycle. Integrate[] sees these constants in the Piecewise statement and simple-mindedly replaces them with +t and -t. So as t gets larger or smaller, the integral(s) yield ramp functions that alternate in sign during every half-cycle of the square wave. What Integrate should yield is a positive-going ramp on the + half-cycle, and a decreasing positive-valued ramp on the - half-cycle of the square wave. The correct function should be the sum of SquareWave[t]*dt over
t. The
integrals created over each (continuous, differentiable) half-cycle should then be added to create a new function. I can't figure out how to implement Integrate on piecewise functions like this. Does anyone know how?
P.S. I couldn't find a way to search MathGroup postings from the group's pages, so I may be posting an already solved problem. If so, please let me know how I can use the group more efficiently.
Yes somebody knows. This:
Plot[SquareWave[x], {x, 0, 5}]
is the plot of a SquareWave. Evaluate it. And this:
f[z_] := Integrate[SquareWave[x], {x, 0, z}];
is a definition of the integral of the square wave. One may now plot it. Evaluate this:
Plot[f[z], {z, 0, 5}]
It behaves exactly as you described it should.
Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG
Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44
e-mail: alexei.boulbitch@iee.lu
[toc] | [next] | [standalone]
| From | debguy <johnandsara2@cox.net> |
|---|---|
| Date | 2013-04-10 04:49 +0000 |
| Message-ID | <kk2r05$bj4$1@smc.vnet.net> |
| In reply to | #13734 |
Mathematica has extensive support for integrating in many situations. So I'm unsure if you tried them all? Integrate[ Interpolation[ ... ] ] NumericalMath`ListIntegrate` NIntegrateInterpolatingFunction support for integrating with DiracDelta as well as other things and Mathematica can Sum pretty quickly if all else fails I can't see trying to set up an integral containing unknown interpolation unless the eq'n are posted, not in a short time anyhow :)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web