tomleslie

4626 Reputation

10 Badges

9 years, 129 days

MaplePrimes Activity


These are answers submitted by tomleslie

I think you have a problem with parentheses - your plot range 0..100 is included in a ist with functions to be plotted becuase of the positioning of your square brackets. The following is a trivial example of two plots, which does work

X2:=t->t^2;
Y2:=t->t^2-3*t;
plot([Y2(t),-X2(t)], t=0...100, numpoints=100);

  1. You have missed the multiplication sign between 'p' and '(4x2+6)' - one of the perils of using 2D math input is that this sort of thing is difficult to spot
  2. Once you correct the above, your loop will only return non-zero values for n=1, because your 'polynomial' only contains terms in p^1

see attached

HPM_4corr.mw

eq:=m*diff(x(t),t,t)=-k*x(t)-b*diff(x(t),t);
dsolve(eq, x(t));

cos it works for me

Try this

profit.mw

 

@krismalo 

Using default (ie cubic) spline curve fitting, the following works

  restart;
  with(CurveFitting):
  xlist:= [150, 250, 500, 800, 1300, 2500, 5000]:
  ylist:= [.3, .5, .8, 1.0, 1.2, 1.4, 1.6]:
#
# Define a function to retiurn y-value for given x
#
  gety:= unapply( Spline([seq([xlist[j], ylist[j]], j=1..7)], x), x):
#
# Define a function to retiurn x-value for given y
#
  getx:= unapply( Spline([seq([ylist[j], xlist[j]], j=1..7)], y), y):
#
# Compute the y-value for say x=3000
#
  gety(3000);
#
# Check that previous result corresponds to the supplied x-value
# (near enough!)
#
  getx(%);

Not sure I understand the problem - if I change your final command to

CodeTools:-Usage( plot([f1,u21], 0..10, adaptive=false, axes=none, numpoints=200,labels=[x,u],legend=["t=0","t=0.2"],color=[green,red]) )

then two curves are plotted -one of which shows that your "double integral" is more or less identically zero.

So what exactly is your issue???

the variable Et whose entries you wish to solve for may seem to be a column vector, but is actually a matrix - so Et[1] returns the first 'row' of the matrix as a vector. If you want the first entry, you need to use Et[1][1].

ie

solve(Et[1][1], Q[1])

returns -36949.67738  

plot( sum(0.5^(n), n=1..x), x=0..10 );

Could someone explain what are the main (functional) differences.

I agree with Carl - there are none

On the other hand, if you ever want to make any money out of what you do with Maple (aka commercial use), then you really shoul have a "professional" edition

You might also find an issue with upgrades?

If you were to do this with pencil and paper, then you would proceed by comparing Matrix elements in your final expression. No other option is possible. So the question becomes - how close can I get to this process in Maple?

How about

restart;
A:=Matrix(3,3, (i,j)->a[i,j](t)):
B:=Matrix(3,3, (i,j)->b[i,j](t)):
C:=LinearAlgebra[Transpose](A).B:
ArrayTools[IsEqual]( diff~(C,t),
                     diff~(LinearAlgebra[Transpose](A),t).B+LinearAlgebra[Transpose](A).diff~(B,t)
                   );

whihchwill return true!

So far as I can tell the equations you give in polar coordinates do not correspond to those given in Cartesian cooordinates.

See attached.

deCC.mw

In maple 2015.1, the script

restart;
with(Units[Standard]):
1.0*Unit(volt)/(2000.0*Unit(ampere));

ought to provide output with units of ohms (indicated by a capital omega)

I do not know any way to force the display to use "engineering" notation

 

Adding a couple of simple commands to the end of your original worksheet, I come up with the following

_C3=0,
_C2 is arbitrary
_C1=-2*_C2*s+2/s

see attached.

LGMsol.mw

As in

#
# Generate the expression and save it to a txt file
# because the file extension is .txt, then this file
# will be human-readable
#
   f:=x^2;
   f1:=diff(f,x);
   save f1, "J:/Users/TomLeslie/savetest.txt";
#
# Wipe the previous info, check f1 to make sure it
# has been cleared, then read it from the file and
# check again
#
   restart;
   f1;
   read "J:/Users/TomLeslie/savetest.txt":
   f1;

Obviously you wiill have to change the pathName/filename in the above commands to something appropriate for your machine

Assuming that you want to import data from Excel ranges to and assign these to "sensible" Maple names, consider the attached (contains a lot of step by step comments)

XLimport.mw

First 96 97 98 99 100 101 102 Last Page 98 of 106