# How to put a variable angle?

**URL:** <https://community.wolfram.com/t/how-to-put-a-variable-angle/18885>\
**Category:** Questions\
**Tags:** algebra, equation-solving\
**Created:** [September 24, 2021, 9:11am UTC](https://community.wolfram.com/t/how-to-put-a-variable-angle/18885 "2021-09-24T09:11:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amilagokuu](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@amilagokuu](https://community.wolfram.com/u/amilagokuu)\
**Post date:** [September 24, 2021, 9:11am UTC](https://community.wolfram.com/t/how-to-put-a-variable-angle/18885/1 "2021-09-24T09:11:18Z")

</div>

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/80bacd29-997e-49d8-982f-3c7e5e54acfe)

I can’t figure out how to find this x? What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [September 24, 2021, 1:14pm UTC](https://community.wolfram.com/t/how-to-put-a-variable-angle/18885/2 "2021-09-24T13:14:19Z")

</div>

There are many problems with the code

`v = 82*f[x_]` should be `v = 82*f[x]`, similarly for `u`.

Take a look at `eq02`

```
0 == {{82 Cos[x] (t1 -> (280 Sec[x])/41) - 4.9 (t1 -> (280 Sec[x])/41)^2}}

```

`t1` need to be replaced with the solution for `t`

```
t = t1 /. t[[1]]
eq02 = 0 == u*t - (1/2)*g*(t^2)
Solve[eq02, x] // N
(* {{x -> -2.26376}, {x -> -0.877833}, {x -> 0.877833}, {x -> 2.26376}} *)

```

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [September 24, 2021, 1:16pm UTC](https://community.wolfram.com/t/how-to-put-a-variable-angle/18885/3 "2021-09-24T13:16:50Z")

</div>

There are syntax problems with your code. This gives an answer:

```
f[x_] = Cos[x];
y[x_] = Cos[x];
v = 82*f[x];
u = 82*y[x];
hd = 560; g = 9.8;
eq01 = hd == v*t1;
t = t1 /. First@Solve[eq01, t1];
eq02 = 0 == u*t - (1/2)*g*(t^2);
Angleanswer = Solve[eq02, x]

```

---

<div class="post-metadata">

**Author:** ![amilagokuu](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@amilagokuu](https://community.wolfram.com/u/amilagokuu)\
**Post date:** [September 25, 2021, 12:29pm UTC](https://community.wolfram.com/t/how-to-put-a-variable-angle/18885/4 "2021-09-25T12:29:56Z")

</div>

Thank you very much.

---

<div class="post-metadata">

**Author:** ![amilagokuu](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@amilagokuu](https://community.wolfram.com/u/amilagokuu)\
**Post date:** [September 25, 2021, 12:30pm UTC](https://community.wolfram.com/t/how-to-put-a-variable-angle/18885/5 "2021-09-25T12:30:10Z")

</div>

Thank you very much.
