Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.maple > #1018
| From | Joe Riel <joer@san.rr.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.maple |
| Subject | Re: Differentiating with respect to an expression |
| Date | 2014-11-11 18:00 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <87a93xkwix.fsf@san.rr.com> (permalink) |
| References | <m3u1gm$7ir$1@news.albasani.net> <87sihpl61w.fsf@san.rr.com> <m3u6n6$kkr$1@news.albasani.net> <m3uatb$st7$1@speranza.aioe.org> <m3uemq$54f$1@news.albasani.net> |
rouben@shadow.(none) (Rouben Rostamian) writes:
> In article <m3uatb$st7$1@speranza.aioe.org>,
> Nasser M. Abbasi <nma@12000.org> wrote:
>>On 11/11/2014 5:39 PM, none Rouben Rostamian wrote:
>>
>>> Thanks much, Joe, this is exactly what I was hoping for.
>>> I had no idea about frontend() or the Physics package.
>>>
>>> This brings up a somewhat related question. Doing
>>> frontend(int, [x(t)^2, x(t)]);
>>> we get x(t)^3/3, which is fine. The following, however,
>>> issues an Error message:
>>> frontend(int, [x(t)^2, x(t)=a..b]);
>>>
>>> Is there a way to get that to work too?
>>>
>>> Rouben
>>>
>>
>>I do not use frontend() either. But if all else fails, you
>>can simply use calculus
>>
>>------------------------------
>>restart;
>>f := frontend(int,[x(t)^2, x(t)]);
>>f := unapply(f,t);
>>limit(f(t),t=b)-limit(f(t),t=a);
>>-------------------------
>>
>> (1/3)*x(b)^3-(1/3)*x(a)^3
>
> Hi Nasser, that's good but it's not exactly what
> I had asked. Your result integrates over t=a..b.
> I wanted x(t)=a..b, but that's easy to fix:
> f := frontend(int,[x(t)^2, x(t)]);
> eval(f, x(t)=b) - eval(f, x(t)=a);
>
> This technique, however, does not work in a more complex case.
> For instance, let's write x' and x'' for the first and second
> derivatives of x. We want to integrate x'' * x' * x^2 with
> respect to x. So we do:
>
> frontend(int, [diff(x(t),t,t)*diff(x(t),t)*x(t)^2, x(t)]);
>
> and we get the expected 1/3 * x'' * x' * x^3.
>
> Now, how do we do the corresponding definite integral
> where x(t)=a..b ? The expected answer is
> 1/3 * x''(t) * x'(t) * (b^3 - a^3).
frontend(int, [diff(x(t),t,t)*diff(x(t),t)*x(t)^2, x(t)=a..b], [{`+`,`*`,`^`,`=`,`..`},{}]);
1/3*diff(x(t),`$`(t,2))*diff(x(t),t)*(-a^3+b^3)
--
Joe Riel
Back to comp.soft-sys.math.maple | Previous | Next — Previous in thread | Next in thread | Find similar
Differentiating with respect to an expression rouben@shadow.(none) (Rouben Rostamian) - 2014-11-11 22:10 +0000
Re: Differentiating with respect to an expression Joe Riel <joer@san.rr.com> - 2014-11-11 14:35 -0800
Re: Differentiating with respect to an expression rouben@shadow.(none) (Rouben Rostamian) - 2014-11-11 23:39 +0000
Re: Differentiating with respect to an expression "Nasser M. Abbasi" <nma@12000.org> - 2014-11-11 18:50 -0600
Re: Differentiating with respect to an expression "Nasser M. Abbasi" <nma@12000.org> - 2014-11-11 19:44 -0600
Re: Differentiating with respect to an expression rouben@shadow.(none) (Rouben Rostamian) - 2014-11-12 01:55 +0000
Re: Differentiating with respect to an expression Joe Riel <joer@san.rr.com> - 2014-11-11 18:00 -0800
Re: Differentiating with respect to an expression Joe Riel <joer@san.rr.com> - 2014-11-11 18:03 -0800
Re: Differentiating with respect to an expression rouben@shadow.(none) (Rouben Rostamian) - 2014-11-12 02:44 +0000
Re: Differentiating with respect to an expression Joe Riel <joer@san.rr.com> - 2014-11-11 19:16 -0800
Re: Differentiating with respect to an expression rouben@shadow.(none) (Rouben Rostamian) - 2014-11-12 04:53 +0000
Re: Differentiating with respect to an expression Joe Riel <joer@san.rr.com> - 2014-11-11 17:45 -0800
Re: Differentiating with respect to an expression Joe Riel <joer@san.rr.com> - 2014-11-11 17:52 -0800
Re: Differentiating with respect to an expression rouben@shadow.(none) (Rouben Rostamian) - 2014-11-12 02:03 +0000
csiph-web