John Fredsted

2238 Reputation

15 Badges

20 years, 171 days

MaplePrimes Activity


These are replies submitted by John Fredsted

You can do something like:
eq := isolate(
	+(1/R1+1/R2)*(diff(V2(t), t))
	-(diff(V1(t), t))/R1+(V2(t)-V1(t))/L
	+C*(diff(V2(t), `$`(t, 2))) = 0
,V1(t)):
subs(
	{diff(V1(t),t) = s,diff(V2(t),t) = s,diff(V2(t),t$2) = s^2},
	rhs(eq) = lhs(eq)
);
You can do something like:
eq := isolate(
	+(1/R1+1/R2)*(diff(V2(t), t))
	-(diff(V1(t), t))/R1+(V2(t)-V1(t))/L
	+C*(diff(V2(t), `$`(t, 2))) = 0
,V1(t)):
subs(
	{diff(V1(t),t) = s,diff(V2(t),t) = s,diff(V2(t),t$2) = s^2},
	rhs(eq) = lhs(eq)
);
Are you talking about performing a Laplace transform of the differential equation?
Are you talking about performing a Laplace transform of the differential equation?
Your are of course quite right. The second order derivatives must be examined too. For a local maximum it must be negative, and for a local minimum it must be positive. Obviously, it is too many years ago I learned about this in high school. Thanks for refreshing my memory.
Your are of course quite right. The second order derivatives must be examined too. For a local maximum it must be negative, and for a local minimum it must be positive. Obviously, it is too many years ago I learned about this in high school. Thanks for refreshing my memory.
Thanks for that important improvement which I have now included in the post above. I was surprised to see that my original function failed for the simple expression you give, because I did test that function on a couple of expressions most of which were more complicated. Now the expression you give combines correctly:
fullCombine(2*sin(t)+sqrt(3)*cos(t));

7^(1/2)*cos(-arctan(2/3*3^(1/2))+t)

PS: Thanks for not making your post a reply to mine, thereby making it possible for me to include your improvement.
Thanks for that important improvement which I have now included in the post above. I was surprised to see that my original function failed for the simple expression you give, because I did test that function on a couple of expressions most of which were more complicated. Now the expression you give combines correctly:
fullCombine(2*sin(t)+sqrt(3)*cos(t));

7^(1/2)*cos(-arctan(2/3*3^(1/2))+t)

PS: Thanks for not making your post a reply to mine, thereby making it possible for me to include your improvement.
Thanks for your comment concerning the superfluous backquotes, which I actually did consider leaving out. I agree with you that the new specially tailored fromTree has less beauty than the original one has.
Sounds nice. I also prefer small quiet places (with no noisy drunken people present).
Thanks for your kind words.
You are quite right that fromTree fails for expressions which contains lists and/or sets. I was not aware of that. Thanks for pointing that out to me. Maybe it is just me fooling around or misreading your post, but I cannot get any of the four versions of improvement your suggest to work for a list or a set. I think I have improved fromTree as follows (implementing at the same time your tip concerning seq and the global variable i):
fromTree := x -> `if`(op(x) = x, x,
	subs({`list`=`[]`,`set`=`{}`},x[1])(map(fromTree,x[2..-1])[])
):
An example:
> expr := {[1,2,{3,4}],int(exp(cos(x)),x)}:
> tree := toTree(expr);
> fromTree(tree);
tree := [set, [list, 1, 2, [set, 3, 4]], [int, [exp, [cos, x]], x]]
             {[1, 2, {3, 4}], int(exp(cos(x)), x)}
Thank you guys. I will have to be careful not to switch in my address book the "l" and "x" of your names, otherwise I would end up in the wrong town :-), as also Alex seems to be aware of. Munich is famous for its Oktoberfest. I have once visited it. I was very much impressed with the waitresses carrying around so many large beer mugs. What is the record, Axel?
I apologize for having behaved unreasonably. I guess I reacted the way I did because I had hoped for some (obvious, to me) recognition as I felt that I had made something a little cool. Maybe a bit childish of me!? On the other hand, do we not all need a little recognition once in a while?
Thanks for your kindness. I want to point out, though, that what discourages me is not that it turns out that there is nothing novel about my contribution but solely the way this fact is being delivered.
First 54 55 56 57 58 59 60 Last Page 56 of 68