## 30 Reputation

10 years, 274 days

## How do I plot two functions, in differen...

Maple 17

Hi,

Apologies if this is a very simple question and I am being a bit stupid, but how do I plot two functions of r on one graph, if they operate over different values of r?

Say I have the functions:

FOO = r→APOT*exp(-r/rho)-CPOT/r^6+4*E2/r

g = r→(c1*exp(d1*r)+c2*exp(d2*r)+c3*exp(d3*r)+c4*exp(d4*r))/r

where FOO takes values of r between 0.5 and 2, and g takes values of r between o.2 and 0.5.

Any help would be appreicated!

## How do I change the form of the output s...

Maple 17

Hi,

I have the following six equations that I need to solve:

eq1 := A^5*f6+A^4*f5+A^3*f4+A^2*f3+A*f2+f1 = ln(V1);
print(??); # input placeholder
eq2 := B^5*f6+B^4*f5+B^3*f4+B^2*f3+B*f2+f1 = ln(V2);

eq3 := 5*A^4*f6+4*A^3*f5+3*A^2*f4+2*A*f3+f2 = F1/V1;
eq4 := 5*B^4*f6+4*B^3*f5+3*B^2*f4+2*B*f3+f2 = F2/V2;
eq5 := 20*A^3*f6+12*A^2*f5+6*A*f4+2*f3 = G1/V1-[F1/V1]^2;
eq6 := 20*B^3*f6+12*B^2*f5+6*B*f4+2*f3 = G2/V2-[F2/V2]^2;

where V1, V2, F1 & F2 have previously been found/defined in the worksheet (document).

When I use the solve command, more often than not I get the expression for the numerical calculation for each variable f1-f6, rather than an actual value:

solutionset := solve({eq1, eq2, eq3, eq4, eq5, eq6}, {f1, f2, f3, f4, f5, f6})

{f1 = 0.4096495220755576e-2*[-1.328181534188746]^2-0.3072371415566682e-1*[-9.408269235937702]^2+12.64287210303000, f2 = .3686845698680018*[-9.408269235937702]^2-49.98313436120349-0.6690942193900774e-1*[-1.328181534188746]^2, f3 = -1.423532089212563*[-9.408269235937702]^2+150.6490386090756+.3909877105143377*[-1.328181534188746]^2, f4 = -.9490213928083751*[-1.328181534188746]^2+1.954938552571689*[-9.408269235937702]^2-190.3706247009334, f5 = .8192990441511152*[-1.328181534188746]^2-1.115157032316796*[-9.408269235937702]^2+103.8844069311055, f6 = .2275830678197542*[-9.408269235937702]^2-20.57204700597870-.2275830678197542*[-1.328181534188746]^2}

Why is Maple not giving me the actual value for the variables, and how do I get it to do so, everytime? [In fact it did output the actual values once – but I have no idea what I did differently: it seems to be very random….]

i.e. how do I output the following:

solutionset := {f1 = 9.930572749191651, f2 = -17.46685689954139, f3 = 25.33406943774393, f4 = -19.00233912206421, f5 = 6.620988906086421, f6 = -.8288827301180226}

thanks

## What is going wrong with my 3D surface p...

Maple 17

So I have the energy of an ion at a several points in space, where the x and z coordinates have been varied from 0-1, keeping y constant. The data is in the following file:

y=0.xlsx

When I come to produce a 3D surface plot (grid) of this file using the plots option in the context menu (on right clicking), the following is produced: the x-axis is in red and the y-axis (z-coordinate) is in blue.

Yet if I use the interactive plot builder, to plot the same data, the only option available to me is a 3D point plot, which produces the following:

[If I try to plot a 3D surface plot (points) using the context menu, I get stuck at a evaluating stage...]

as, ideally, I want a surface plot, why, in the surface plot (grid) is MAPLE not recognising the data that corresponds to the higher z-coordinate values and how I can produce a full surface plot...

## Issues with the displayed result from pe...

Maple 17

Hi

Fairly new to Maple and having trouble with the result displayed when using exponential functions.

So I have the following function h(r), in which f1 - f5 are unknown constants that are to be calculated. [I am attempting to set up the equations needed to do so]:

h := r → exp(f1 + f2r + f3r+ f4r3 + f5r+ f6r5)

Firstly, I need to evaluate h(r) at the point A. But, on entering the evaluate command, the general expression for h is re-produced:

A := 0.2

evalf(h(A))

exp(f6r^5+f5r^4+f4r^3+f3r^2+f1+f2r)

Further, I need to take the natural logarithm of h(A), which produces:

evalf(ln(h(A))

ln(exp(f6r^5+f5r^4+f4r^3+f3r^2+f1+f2r))

How do I get Maple to output the actual result of the substitution of r=A and the logarithm?

i.e. how do I get maple to display:

f1 + 0.2f2 + 0.04f3 + 0.008f4 + 0.0016f5 + 0.00032f6

Apologies if this is a very basic question.

Cheers

## How to plot the energy of an ion as a fu...

Maple 17

Hi,

Struggling to get my head round how to plot the results of the follwoing, as it seems I have 4 variables...

I have a data file containing the results of the following problem:

1) Consider a cube. Each side (a,b,c) has a length of 1 unit.

2) Place an ion (0,0,0) where [a,b and c intersect] and find the associated energy at that point.

3) Move the ion to a point 0.05 units along side a to (0.05,0,0) and re-find the associated energy.

 Page 1 of 1
﻿