## 30 Reputation

9 years, 358 days

## Not sure what that means...

@Markiyan Hirnyk I'm not sure what that means.

## @Carl Love Thank you for your help....

@Carl Love Thank you for your help. The hints went a long way, and I actually went through the intellectual exercise of figuring it out. Some ingenuity was required.

@Kitonum Turns out I misread the question.

The question says to modify this example afterwards:

data := [];
for n f rom 0 to N do
data := [op(data), [evalf(n ∗ b/N), sin(evalf(n ∗ b/N))]];
od;

Because it has 'evalf'. it goes through every point and evaluates it. For example:

data := []; a := 0; b := 2*Pi;

N := 25; for n from 0 to N do

x[n] := a+n*(b-a)/N;

data := [op(data), [evalf(a+n*(b-a)/N), sin(a+n*(b-a)/N)]] end do;

data;

plot(data, x = 0 .. 2*Pi, y = -1 .. 1)

x0 := 0

data := [0,0]

x1 := 2/25Pi

data := [[0., 0]], [0.2513274123, sin|2/25 Pi|]]

and so on and so forth.

## Color...

@Carl Love Thanks. Is there anyway to add color as well?

## A sort of solution...

Turns out I don't need all solutions, I just need between -5 and 15. The solution I came up with was:

> for k from -5 to 15 do fsolve(sin(x)^2 = exp(-x)*cos(x), x = k .. k+1) end do

It will give a bunch of solutions, and a lot of fsolve(sin(x)^2 = exp(-x)*cos(x), x, -4 .. -3), for when it can't solve the equation. What I want is:

a) Only numeric solutions

and

b) To figure out how to decrease the gap between the numbers I am searching for. For example, between 6 and 7, there are 2 solutions: 6.239013543 and 6.325488468. How would I be able to include both?

 Page 1 of 1
﻿